IMPLEMENT_SERIAL( CMyClass, CObject, VERSIONABLE_SCHEMA | 2 ) ... See AlsoDECLARE_SERIAL,RUNTIME_CLASS,CObject::IsKindOf
我在MFC代码中查看DECLARE_SERIAL和IMPLEMENT_SERIAL宏的定义,定义如下: #斜杠是指预定义还没有结束 包含下面以行 例如 #define DECLARE_SERIAL(class
void CRuntimeClass::Store(CArchive& ar) const // stores a runtime class description { WORD nLen = (WORD)lstrlenA(m_lpszClassName); ar << (WORD)m_wSchema << nLen; ar.Write(m_lpszClassName, nLen*sizeof(char)); } class CScribDoc : public CDocument ...
class CCircle : public CObject { DECLARE_SERIAL(CCircle) public: void Serialize(CArchive&); ... }; 以及在.CPP 档中做这样的动作: IMPLEMENT_DYNCREATE(CScribDoc, CDocument) IMPLEMENT_SERIAL(CStroke, CObject, 2) IMPLEMENT_SERIAL(CRectangle, CObject, 1) IMPLEMENT_SERIAL(CCircle, CObject,...
Generates the C++ code necessary for a dynamicCObject-derived class with run-time access to the class name and position within the hierarchy. IMPLEMENT_SERIAL(class_name, base_class_name, wSchema ) Parameters class_name The actual name of the class. ...
CArchive& AFXAPI operator>>(CArchive& ar, class_name* &pOb) \ { pOb = (class_name*) ar.ReadObject(RUNTIME_CLASS(class_name)); \ return ar; } \ 为了在每一个对象被处理(读或写)之前,能够处理琐屑的工作,诸如判断是否第一次 出现、记录版本号码、记录文件名等工作,CRuntimeClass 需要两个函...
在类定义内部加上DECLARE_SERIAL(你的类名),不需要引号,如 class CMyClass: public CObject { public: CMyClass( ); void Serialize( CArchive& archive ); DECLARE_SERIAL( CmyClass ) }; 在类的实现文件开始加上IMPLEMENT_SERIAL(),如: /* MyClass.cpp */ #include "stdafx.h" #include "MyClass.h...
\ _DECLARE_DYNCREATE(class_name) \ AFX_API friend CArchive& AFXAPI operator>>(CArchive& ar, class_name* &pOb);实际上的意思是DECLARE_SERIAL(class_name)定义成下面两行 _DECLARE_DYNCREATE(class_name)AFX_API friend CArchive& AFXAPI operator>>(CArchive& ar, class_name* &pOb);
Rusty wrapper for the Unified Extensible Firmware Interface (UEFI). This crate makes it easy to develop Rust software that leverages safe, convenient, and performant abstractions for UEFI functionality. - Implement `core::fmt::Write` for `Serial` · rust
In a data storage subsystem, drive-level processing treats data storage media as WORM by automatically advancing a write append limiter as data is written, and preventing changes to data occurring before the write append limiter. Despite this media's WORM nature, the drive-level processing permits...