Proud::ByteArray 클래스 참조
Proud::ByteArray에 대한 상속 다이어그램 :

Public 타입

typedef CFastArray< uint8_t,
false, true, int > 
Base
 

Public 멤버 함수

 ByteArray ()
 
 ByteArray (const uint8_t *data, int count)
 
 ByteArray (const ByteArray &src)
 
String ToHexString ()
 
bool FromHexString (String text)
 
- Proud::CFastArray< uint8_t, false, true, int >(으)로부터 상속된 Public 멤버 함수
 CFastArray ()
 
 CFastArray (const uint8_t *data, intcount)
 
 CFastArray (const CFastArray &src)
 
void SetGrowPolicy (GrowPolicy val)
 
GrowPolicy GetGrowPolicy ()
 
void SetMinCapacity (intnewCapacity)
 
void SetCapacity (intnewCapacity)
 
void SuspendShrink ()
 
void OnRecycle ()
 
void OnDrop ()
 
void SetCount (intnewVal)
 
void AddCount (intaddLength)
 
void resize (intsz)
 for STL compatibility
 
int GetCapacity () const
 
int GetCount () const
 
int size () const
 for STL compatibility
 
bool IsEmpty () const
 
void Clear ()
 
void ClearAndKeepCapacity ()
 
T_IN ElementAt (intindex) const
 
uint8_t & ElementAt (intindex)
 
T_IN operator[] (intindex) const
 
uint8_t & operator[] (intindex)
 
uint8_t * GetData ()
 
const uint8_t * GetData () const
 
void Add (T_IN value)
 
void Insert (intindexAt, T_IN value)
 
void AddRange (const uint8_t *data, intcount)
 
void InsertRange (intindexAt, const uint8_t *data, intcount)
 
void CopyRangeTo (CFastArray &dest, intsrcOffset, intcount) const
 
void CopyTo (CFastArray &dest) const
 
void CopyFrom (const CFastArray &src)
 
void CopyFrom (const uint8_t *from, intfromCount)
 
void RemoveRange (intindex, intcount)
 
void RemoveAt (intindex)
 
bool RemoveOneByValue (T_IN value)
 
CFastArrayoperator= (const CFastArray &src)
 
int FindByValue (T_IN value)
 
bool Contains (T_IN value)
 
bool Equals (const CFastArray &rhs) const
 
void clear ()
 for STL compatibility
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
iterator erase (iterator iter)
 
uint8_t PopBack ()
 
void RemoveAndPullLast (intptr_t index)
 
virtual void DataBlock_Free (void *data)
 
virtual void * DataBlock_Alloc (size_t length)
 
virtual void * DataBlock_Realloc (void *oldPtr, size_t newLength)
 

추가로 상속된 멤버들

- Proud::CFastArray< uint8_t, false, true, int >(으)로부터 상속된 Protected 멤버 함수
void InitVars ()
 
virtual int GetRecommendedCapacity (intactualCount)
 
void BoundCheck (intindex) const
 
- Proud::CFastArray< uint8_t, false, true, int >(으)로부터 상속된 Protected 속성
uint8_t * m_Data
 
int m_Length
 
int m_Capacity
 
int m_minCapacity
 
bool m_suspendShrink
 
GrowPolicy m_growPolicy
 

상세한 설명

바이트 배열. ProudNet의 용도에 맞게 최적화되어 있다.

  • 네트워크 패킷을 주고 받는 목적이므로 int32로만 사용을 강제한다.
  • ByteArray는 operator new,delete도 오버라이드되어서 fast heap을 접근하고 있다. 따라서 사용시 Proud.CFastHeap의 주의사항 규약을 준수해야 한다.

생성자 & 소멸자 문서화

Proud::ByteArray::ByteArray ( )
inline

기본 생성자

Proud::ByteArray::ByteArray ( const uint8_t *  data,
int  count 
)
inline

외부 데이터를 복사해오는 생성자

매개변수
data복사해올 BYTE배열의 포인터
countcount 만큼을 복사한다.
Proud::ByteArray::ByteArray ( const ByteArray src)
inline

외부 데이터를 복사해오는 생성자

매개변수
src복사할 ByteArray 원본

멤버 함수 문서화

bool Proud::ByteArray::FromHexString ( String  text)

16진수 배열 String을 16진수로 바꾸어준다.

매개변수
16진수배열 String (예 text = L"FFFFEAB12")
반환값
변환이 성공하면 true, 실패하면 false
String Proud::ByteArray::ToHexString ( )

배열을 16진수의 String으로 변환하여 return해준다.

반환값
String으로 변환된 16진수 배열 (예 L"FFAB123")