====== PostDocument ====== **//Inherited from//** [[class::xdocument|XDocument]], **//Inherited by//** NULL **//Friend class//** NULL **//Description//** **//Members//** * PostViewData * [[postdocument#m_pgldata|m_pGLData]] * XModel * [[postdocument#m_pmodel|m_pModel]] * ulong [[postdocument#m_ulactivemeshid|m_ulActiveMeshID]] * XResult * [[postdocument#m_pactiverlt|m_pActiveRlt]] * ResultIndexMap * [[postdocument#m_pindexmap|m_pIndexMap]] **//Public interface//** * [[postdocument#postdocument1|PostDocument]]() * [[postdocument#~postdocument|~PostDocument]]() * void [[postdocument#save|save]](const char * fname, const char * scheme) * bool [[postdocument#load|load]](const char * fname) * bool [[postdocument#isempty|isEmpty]]() * void [[postdocument#clear|clear]]() * void [[postdocument#buildobjecttree|buildObjectTree]]() * XTree * [[postdocument#getobjecttree|getObjectTree]]() * void [[postdocument#init|init]]() * void [[postdocument#release|release]]() * XViewData * [[postdocument#getviewdata|getViewData]]() * void [[postdocument#createviewdata|createViewData]]() * bool [[postdocument#checknodestatus|checkNodeStatus]](TreeNode * node) * TreeNode* [[postdocument#updateobjecttree|updateObjectTree]](const XItem * obj, bool bDelete) * ModelManager * [[postdocument#getmodelmanager|getModelManager]]() * XModel * [[postdocument#getmodel|getModel]](ulong mid = 0) * XModel * [[postdocument#createmesh|createMesh]](ulong mid = 0) * XResult * [[postdocument#getactiveresult|getActiveResult]]() * void [[postdocument#setactiveresult|setActiveResult]](XResult * rlt) * void [[postdocument#savemodel|saveModel]](const char * fname,int ioFlag) * void [[postdocument#loadmodel|loadModel]](const char * fname,int ioFlag) * bool [[postdocument#queryitemtabledata|queryItemTableData]](vector * objs, const char * name, vector * data) * void [[postdocument#registerenumstring|registerEnumString]]() * void [[postdocument#test|test]]() * const XItem [[postdocument#*getitem|*getItem]](const XUniqueObjectID * ue) * void [[postdocument#getiteminformation|getItemInformation]](const XUniqueObjectID * pItem, string * infoStr) * ResultIndexMap * [[postdocument#getresultindexmap|getResultIndexMap]](XModel * mesh) * void [[postdocument#loadandactivateresult|loadAndActivateResult]](XResult * rlt, int comp = -1, ulong beamLayerID = 0, ulong shellLayerID = 0) **//Protected interface//** * virtual void [[postdocument#createmodel|createModel]]() * void [[postdocument#buildresulttree|buildResultTree]]() ---- {{anchor:m_pgldata}} **PostViewData * m_pGLData** 文档视图对象 {{anchor:m_pmodel}} **XModel * m_pModel** 当前模型对象 {{anchor:m_ulactivemeshid}} **ulong m_ulActiveMeshID** 当前网格对象ID {{anchor:m_pactiverlt}} **XResult * m_pActiveRlt** 当前结果数据对象 {{anchor:m_pindexmap}} **ResultIndexMap * m_pIndexMap** 当前结果数据索引 ---- {{anchor:postdocument1}} **PostDocument()** *function: 应用文档构造函数 *parameters: NULL *return value: 无 {{anchor:~postdocument}} **~PostDocument()** *function: 析构函数 *parameters: NULL *return value: 无 {{anchor:save}} **void save(const char * fname, const char * scheme)** *function: 将文档保存到指定文件中 *parameters: - [i]const char * fname: 文件名 - [i] const char * scheme: 应用方案名 *return value: 无 {{anchor:load}} **bool load(const char * fname)** *function: 从文件中载入文档数据 *parameters: - [i]const char * fname: 文件名 *return value: 无 {{anchor:isempty}} **bool isEmpty()** *function: 判断文档是否为空(不包含任何数据对象) *parameters: NULL *return value: 如文档为空返回true,否则返回false {{anchor:clear}} **void clear()** *function: 清空文档所有数据对象 *parameters: NULL *return value: 无 {{anchor:buildobjecttree}} **void buildObjectTree()** *function: 重建对象树 *parameters: NULL *return value: 无 {{anchor:getobjecttree}} **XTree * getObjectTree()** *function: 获取文档对象树 *parameters: NULL *return value: 对象树指针 {{anchor:init}} **void init()** *function: 初始化文档 *parameters: NULL *return value: 无 {{anchor:release}} **void release()** *function: 释放文档所占内存空间 *parameters: NULL *return value: 无 {{anchor:getviewdata}} **XViewData * getViewData()** *function: 获取文档视图数据,文档视图数据包含用于显示的数据以及状态信息 *parameters: NULL *return value: 文档视图指针 {{anchor:createviewdata}} **void createViewData()** *function: 创建文档视图 *parameters: NULL *return value: 文档视图对象指针 {{anchor:checknodestatus}} **bool checkNodeStatus(TreeNode * node)** *function: 检查模型树节点状态 *parameters: - [i]TreeNode * node: 树节点 *return value: 如数据可用返回true,否则返回false {{anchor:updateobjecttree}} **TreeNode* updateObjectTree(const XItem * obj, bool bDelete)** *function: 更新对象树 *parameters: - [i]const XItem * obj: 数据对象 - [i] bool bDelete: 是否删除对象 *return value: {{anchor:getmodelmanager}} **ModelManager * getModelManager()** *function: 获取模型对象管理器 *parameters: NULL *return value: 模型对象管理器 {{anchor:getmodel}} **XModel * getModel(ulong mid = 0)** *function: 获取模型对象 *parameters: - [i]ulong mid = 0: 模型ID *return value: 模型对象 {{anchor:createmesh}} **XModel * createMesh(ulong mid = 0)** *function: 创建网格模型 *parameters: - [i]ulong mid = 0: 模型ID *return value: 网格模型对象 {{anchor:getactiveresult}} **XResult * getActiveResult()** *function: 获取当前结果对象 *parameters: NULL *return value: 当前结果对象 {{anchor:setactiveresult}} **void setActiveResult(XResult * rlt)** *function: 设置当前结果对象 *parameters: - [i]XResult * rlt: 结果数据对象 *return value: 无 {{anchor:savemodel}} **void saveModel(const char * fname,int ioFlag)** *function: 保存模型为文件 *parameters: - [i]const char * fname: 文件路径名 - [i]int ioFlag: 文件格式 *return value: 无 {{anchor:loadmodel}} **void loadModel(const char * fname,int ioFlag)** *function: 从文件中载入模型 *parameters: - [i]const char * fname: 文件路径名 - [i]int ioFlag: 文件格式 *return value: 无 {{anchor:queryitemtabledata}} **bool queryItemTableData(vector * objs, const char * name, vector * data)** *function: *parameters: - [i]vector * objs: - [i] const char * name: - [i] vector * data: *return value: {{anchor:*getitem}} **const XItem *getItem(const XUniqueObjectID * ue)** *function: 通过唯一对象标识访问数据对象 *parameters: - [i]const XUniqueObjectID * ue: 唯一对象标识 *return value: 数据对象指针 {{anchor:getiteminformation}} **void getItemInformation(const XUniqueObjectID * pItem, string * infoStr)** *function: 通过唯一对象标识获取数据对象的信息 *parameters: - [i]const XUniqueObjectID * ue: 唯一对象标识 - [i] string * infoStr: 数据对象信息 *return value: 无 {{anchor:getresultindexmap}} **ResultIndexMap * getResultIndexMap(XModel * mesh)** *function: 获取结果索引 *parameters: - [i]XModel * mesh: 结果所属的网格模型 *return value: 结果索引 {{anchor:loadandactivateresult}} **void loadAndActivateResult(XResult * rlt, int comp = -1, ulong beamLayerID = 0, ulong shellLayerID = 0)** *function: 载入结果数据并激活 *parameters: - [i]XResult * rlt: 结果对象 - [i] int comp = -1: 结果分量序号 - [i] ulong beamLayerID = 0: 杆梁结果层序号 - [i] ulong shellLayerID = 0: 板壳结果层序号 *return value: 无 ---- {{anchor:createmodel}} **virtual void createModel()** *function: 创建模型对象 *parameters: NULL *return value: 无 {{anchor:buildresulttree}} **void buildResultTree()** *function: 构造结果树 *parameters: NULL *return value: 无