template'<'class TYPE, class ARG_TYPE'>'
class CArray : public CObject
{
public:
// Construction
CArray();
// Attributes
int GetSize() const;
int GetUpperBound() const;
void SetSize(int nNewSize, int nGrowBy = -1);
// Operations
// Clean up
void FreeExtra();
void RemoveAll();
// Accessing elements
TYPE GetAt(int nIndex) const;
void SetAt(int nIndex, ARG_TYPE newElement);
TYPE& ElementAt(int nIndex);
// Direct Access to the element data (may return NULL)
const TYPE* GetData() const;
TYPE* GetData();
// Potentially growing the array
void SetAtGrow(int nIndex, ARG_TYPE newElement);
int Add(ARG_TYPE newElement);
int Append(const CArray& src);
void Copy(const CArray& src);
// overloaded operator helpers
TYPE operator[](int nIndex) const;
TYPE& operator[](int nIndex);
// Operations that move elements around
void InsertAt(int nIndex, ARG_TYPE newElement, int nCount = 1);
void RemoveAt(int nIndex, int nCount = 1);
void InsertAt(int nStartIndex, CArray* pNewArray);
// Implementation
protected:
TYPE* m_pData; // the actual array of data
int m_nSize; // # of elements (upperBound - 1)
int m_nMaxSize; // max allocated
int m_nGrowBy; // grow amount
public:
~CArray();
void Serialize(CArchive&);
#ifdef _DEBUG
void Dump(CDumpContext&) const;
void AssertValid() const;
#endif
};
template'<'class TYPE, class ARG_TYPE'>'
void CArray<TYPE, ARG_TYPE>::Serialize(CArchive& ar)
{
ASSERT_VALID(this);
CObject::Serialize(ar);
if (ar.IsStoring())
{
ar.WriteCount(m_nSize);
}
else
{
DWORD nOldSize = ar.ReadCount();
SetSize(nOldSize, -1);
}
SerializeElements<TYPE>(ar, m_pData, m_nSize);
}
------
흠-_-
Serialize 해서 파일에 저장하는거 까진 성공했는데;
이거 왠걸;;
왜 파일들이 깨져서 저장되지;
Load 한번 해봐야겠다-_-
-----
CVS 최악-_-
최악-_-
이제는 체크아웃은 되는데 커밋이랑 업데이트랑 에드가 안된다 썩을
ㄱ ㅐ 짜증나심-_-