LibreOffice源码开发_重要数据结构

更新时间:2023-07-09 05:28:58 阅读: 评论:0

爱国演讲稿
林志炫 没离开过 我是歌手LibreOffice源码开发_重要数据结构
暂时记录⼀下,有空整理
翻译器中文翻英文
meshbeowulfSfxPoolItem, SfxItemPool and SfxItemSet
From object property's view, a SfxPoolItem reprents one property of an object. For an example, SvxBrushItem(sub of SfxPoolItem) reprents background of an object. The object can be a cell, a drawing object, etc. SvxFontHeightItem reprents font size of character. Every SfxPoolItem has a nWhich as its identity. Every object has veral properties. For complex object, it may have tens of properties. For an example, Spreadsheet cell can have 53 properties. There are thousands of objects in one document. If the document model holds every object's every properties independently, it must u huge of memory. So there is a pool to hold the SfxPoolItems, SfxItemPool. Let's take ScDocumentPool as example. A SfxItemPool can hold many designated(nWhich id is between nStart and nEnd) SfxPoolItems. It has 2 level pointer array. The first level array is ud to hold different kinds of SfxPoolItem. The cond level array is ud to hold different instance of one SfxPoolItem. SfxItemPool has a member pImp points to SfxItemPool_Impl structure, which has a member ppPoolItems points to a pointer array(blue part). For ScDocumentPool, it can be considered that ScDo学做美甲
happy new year to you
single ladies歌词cumentPool has a pointer array to hold SfxPoolItems which nWhich ids are from 100 to 188. Every pointer in the array points to another structure, SfxPoolItemArray_Impl. SfxPoolItemArray_Impl has a member, pData, which points to a SfxPoolItem pointer array(green part). Every element in this array is a pointer points to real SfxPoolItem object.
The SfxPoolItems are different in the pool. When ur t a property of one object, the corresponding SfxPoolItem should be t to the object. It will check whether this SfxPoolItem is existed in the pool before put it in the pool. If it is existed, it will return a pooled SfxPoolItem to t to the object. If it is not existed, it will be added in the pool. So every SfxPoolItem object is distinct from each other. Plea refer SfxItemPool::Put(const SfxPoolItem rItem, USHORT nWhich) for detail info. All obejcts' properties are put into the pool. Becau there is only one instance of SfxPoolItem for one value in the pool, and becau most object has similar properties, the memory will not be taken too much though there are many objects which has many properties. The SfxPoolItem is shared by many object. The life cycle of SfxPoolItem is not same as the related object. It us reference count. When get one SfxPoolItem from pool to t to one object, the reference of this SfxPoolItem object should be plus one. When remove one property from object, the reference of this SfxPoolItem object should be minus one. Plea refer SfxItemPool::Put(const SfxPoolItem rItem, USHORT nWhich) and
mba案例分析
struggle是什么意思SfxItemPool::Remove(const SfxPoolItem& rItem)for detail info. SfxItemSet is a t of SfxPoolItem. Which SfxPoolItem can be put into the t is decided when construct the SfxItemSet. SfxItemSet::_pWhichRanges is ud to specify the ranges for nWhich ID. SfxItemSet::_aItems is a pointer array. Each pointer points the real SfxPoolItem object in the pool.

本文发布于:2023-07-09 05:28:58,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/90/171699.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:有空   源码   爱国   案例   数据结构   演讲稿   分析   开发
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图