"Integration of the Standard Template Library and the Microsoft Foundation Class" - читать интересную книгу автора (Wolfgang Paul, Song Yang)

2.4.2 The serialize function

The generalize scheme for the serialize function is as follows:

void CMyClass::Serialize(CArchiveamp; ar) {

 CObject::Serialize(ar);

 if (ar.IsStoring()) {

  // insert the member objects into ar

 } else {

  // extract the member objects from ar

 }

}