AnyCAD C++ API  2018
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义 
APIDocument.h
浏览该文件的文档.
1 //Public API. Powered by AnyCAD.
2 
3 #ifndef _APIDocument_H_
4 #define _APIDocument_H_
5 
6 #include "APIObjectDef.h"
7 
8 #include "APIObject.h"
9 
10 namespace AnyCAD{ namespace API
11 {
12  class ElementTable;
13  class ElementIterator;
14  class ParameterValue;
15  class UndoTransaction;
16  class DocumentMetadata;
17  class Element;
26  : public Object
27  {
29  public:
34  void SetName (const String& name) ;
39  String GetName () const;
44  String GetUUID () const;
49  DocumentMetadata GetMetadata () const;
54  void SetModified (bool bModified) ;
59  bool IsModified () const;
65  ParameterValue GetParameterValue (ParameterId paramId) const;
71  void SetParameterValue (ParameterId paramId, const ParameterValue& pParameter) ;
76  void SetMasterTypeId (const ElementId& elemId) ;
81  ElementId GetMasterTypeId () const;
86  void SetMasterInstanceId (const ElementId& elemId) ;
91  ElementId GetMasterInstanceId () const;
96  String GetDocumentType () const;
100  void Close () ;
106  UndoTransaction NewTransaction (const String& strName) ;
110  void Undo () ;
115  bool CanUndo () const;
119  void Redo () ;
124  bool CanRedo () const;
129  bool IsUndoEnabled () const;
134  void EnableUndo (bool bEnable) ;
139  bool IsUndoIgnored () const;
144  void IgnoreUndo (bool bIgnored) ;
149  void ClearUndoList (int keepCount) ;
155  ElementId AddElement (const Element& pElement) ;
161  Element FindElement (const ElementId& id) const;
166  bool RemoveElement (const ElementId& id) ;
172  ElementTable FindTable (const String& classId) const;
177  StringList ListTables () const;
182  void AddElementToMaster (const ElementIdList& ids) ;
187  void AddElementToMaster (const ElementId& id) ;
192  void ShowElement (const ElementId& id) ;
197  void ShowElement (const ElementIdList& ids) ;
201  void UpdateViews () ;
206  ElementIterator NewElementIterator () const;
207  };//Document;
208 }}//API
209 
210 #endif //_APIDocument_H_
#define AnyPlatformAPI_API
Definition: AnyPlatformAPI.h:8
Undo/redo transaction.
Definition: APIUndoTransaction.h:18
std::string String
Definition: APIString.h:10
String ParameterId
Definition: APIString.h:11
To iterate the scene node in the scene. Usage: ElementIterator itr = ...; while(itr.More()) { SceneNode node = itr.Next(); .... }.
Definition: APIElementIterator.h:18
The base class for parameter values.
Definition: APIParameterValue.h:19
std::vector< String > StringList
Definition: APIString.h:12
The id.
Definition: APIElementId.h:16
平台基类
Definition: APIObject.h:17
文档类。
Definition: APIDocument.h:25
The base class for the data that need to be stored in document.
Definition: APIElement.h:22
The element table.
Definition: APIElementTable.h:21
The document metadata.
Definition: APIDocumentMetadata.h:19
std::vector< ElementId > ElementIdList
Definition: APIElementId.h:54
#define DECLARE_APISUPER(className, super)
Definition: APIObjectDef.h:33