本站首页    管理页面    写新日志    退出


 

 

 


最新日志

练车
今天是2011年07月02号
温馨
CInternetSession 类
CHttpFile实现Get/Post
在MFC中加一个控制台DOS界面
strtol 函数
outputParam
有关CTime和ColeDateTime
variant_t ,_bstr_t 与

 


 

最近的评论

回复:CHttpFile实现Get/Po
回复:好久没有来了
回复:参数自整定的模糊PID
回复:电子设计大赛自由命题可参考的题目
回复:数字万用表使用方法
回复:公交车上巨搞笑的一幕
回复:电子设计大赛自由命题可参考的题目
回复:电子设计大赛自由命题可参考的题目
回复:电子设计大赛自由命题可参考的题目
回复:暑假回来

 


 

连接




    

The CObArray
sccwqiang 发表于 2008-2-21 20:58:31

                        The CObArray The CObArray class supports arrays of CObject pointers. These object arrays are similar to C arrays, but they can dynamically shrink and grow as necessary. Under Win32, the size of a CObArray object is limited only to available memory.   CObArray incorporates the IMPLEMENT_SERIAL macro to support serialization and dumping of its elements. If an array of CObject pointers is stored to an archive, either with the overloaded insertion operator or with the Serialize member function, each CObject element is, in turn, serialized along with its array index.  Note   Before using an array, use SetSize to establish its size and allocate memory for it. If you do not use SetSize, adding elements to your array causes it to be frequently reallocated and copied. Frequent reallocation and copying are inefficient and can fragment memory. Note   You must use the IMPLEMENT_SERIAL macro in the implementation of your derived class if you intend to serialize the array. 结:其也支持串行化,也就是其内的元素可以被保存到磁盘文件中,功能和Document文档内保存数据一样,都可通过Serivalize(CArchive &ar)来保存相关对象的指针,具体的数据由保存的对象也能过串行化来进行保持.所以CObArray对象也就只有在文档中的Servialize()中去调用它本身的Servialize(),因只有这样子,框架才会自动地去调用要被保存对象的Servialize()函数,从而保存了数据.

阅读全文(2514) | 回复(0) | 编辑 | 精华


发表评论:
昵称:
密码:
主页:
标题:
验证码:  (不区分大小写,请仔细填写,输错需重写评论内容!)

 

 

 


站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.031 second(s), page refreshed 144335376 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号