CArchive::SetObjectSchema

void SetObjectSchema( UINT nSchema );

参数:
nSchema指定该对象的计划。

说明:
调用该成员函数将保存在archive对象中的对象计划设置为nSchema指定的项目。
之后调用的GetObjectSchema函数将返回保存在nSchema中的值。
SetObjectSchema的高级使用:比如,当你想在一个派生类的Serialize函数中读入一个特殊版本。

示例:
CFile myFile("myfile.dat", CFile::modeCreate | CFile::modeRead);
CArchive ar(&myFile, CArchive::load);

// Set schema to 2 and verify.
ar.SetObjectSchema(2);
ASSERT(ar.GetObjectSchema() == 2);

请参阅:CArchive::GetObjectSchema