zhouqijie

Object类



RTTI & Produce

定义了获取ClassID的方法。
定义了Produce方法。
定义了Abstract/Seal等信息。

	struct RTTI
	{
		RTTI*                    base;// super rtti class
		Object::FactoryFunction* factory;// the factory function of the class
		int                      classID;// the class ID of the class
		std::string              className;// the name of the class
		int                      size;// sizeof (Class)
		bool                     isAbstract;// is the class Abstract?
	};



InstanceID

运行时生成的Object以及编辑器场景添加且未保存的Object是负的InstanceID。
读取载入的Object是正的InstanceID。

SInt32 m_InstanceID;
GetInstanceID();
SetInstanceID(int inID);

AllocateAndAssignInstanceIDNoLock(在Produce中调用)



SetDirty方法

Whenever variables that are being serialized in Transfer change, SetDirty () should be called。
This will allow tracking of objects that have changed since the last saving to disk or over the network。
每当在Transfer中序列化的变量发生变化时,应调用SetDirty。
这将允许跟踪自上次保存到磁盘或通过网络以来已更改的对象。