CFx SDK Documentation  2020SP3
daiEntityInstance.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2019, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Open Design Alliance software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Open Design Alliance Copyright (C) 2002-2019 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 #ifndef _DAI_ENTITY_INSTANCE_H_
25 #define _DAI_ENTITY_INSTANCE_H_
26 
27 #include "OdaCommon.h"
28 #include "Gi/GiDrawable.h"
29 #include "RxValue.h"
30 
34 namespace OdDAI {
35 
36  class Model;
37  class Entity;
38  class OdSpfFilerBase;
39 
40  class Attribute;
42 
47  {
48  //DOM-IGNORE-BEGIN
50  //DOM-IGNORE-END
51 
55  EntityInstance() : m_id(NULL) {};
56 
61  Model* owningModel() const;
62 
70  virtual OdResult inFields(OdSpfFilerBase *rdFiler) { return eNotImplemented; };
71 
79  virtual OdResult outFields(OdSpfFilerBase *wrFiler) { return eNotImplemented; };
80 
84  virtual void setInverseCounterParts() {};
85 
89  virtual void resetInverseCounterParts() {};
90 
96  bool isInstanceOf(const char *entityName) const;
97 
103  bool isInstanceOf(const Entity *entityDef) const;
104 
110  bool isKindOf(const char *entityName) const;
111 
117  bool isKindOf(const Entity *entityDef) const;
118 
123  virtual Entity* getInstanceType() const = 0;
124 
129  virtual OdAnsiString typeName() const = 0;
130 
139  virtual OdRxValue getAttr(const OdAnsiString &attrName) const = 0;
140 
147  virtual bool putAttr(const OdAnsiString &explicitAttrName, const OdRxValue &val) = 0;
148 
154  virtual bool testAttr(const OdAnsiString &attrName) const = 0;
155 
161  virtual bool testAttr(const AttributePtr& attribute) const;
162 
163 
168  virtual void unsetAttr(const OdAnsiString &explicitAttrName) = 0;
169 
174  virtual void unsetAttr(const AttributePtr& attribute);
175 
182  virtual bool isPersistent() const { return m_id != NULL; }
183 
190  virtual OdDbStub* id() const { return m_id; };
191 
196  virtual void setGsNode(OdGsCache* pGsNode) { throw OdError(eNotImplemented); };
197 
202  virtual OdGsCache* gsNode() const { throw OdError(eNotImplemented); };
203 
204 //DOM-IGNORE-BEGIN
205  protected:
206 
208  virtual bool subWorldDraw(OdGiWorldDraw * wd) const { throw OdError(eNotImplemented); };
209  virtual void subViewportDraw(OdGiViewportDraw * vd) const {};
210 
211  protected:
212  OdDbStub *m_id;
213 
214  friend class ModelContents;
215 //DOM-IGNORE-END
216  };
217 
222 
223 }
224 
225 #endif // _DAI_ENTITY_INSTANCE_H_
OdResult
OdResult
Definition: OdResult.h:29
NULL
#define NULL
Definition: GsProperties.h:177
RxValue.h
OdGsCache
Definition: GsModel.h:40
OdDAI::EntityInstance
Definition: daiEntityInstance.h:47
OdDAI::EntityInstancePtr
OdSmartPtr< EntityInstance > EntityInstancePtr
Definition: daiEntityInstance.h:221
OdDAI::EntityInstance::subWorldDraw
virtual bool subWorldDraw(OdGiWorldDraw *wd) const
Definition: daiEntityInstance.h:208
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
OdDAI::EntityInstance::subViewportDraw
virtual void subViewportDraw(OdGiViewportDraw *vd) const
Definition: daiEntityInstance.h:209
OdRxValue
Definition: RxValue.h:64
OdDAI
Definition: daiAccessDefines.h:31
OdDAI::EntityInstance::subSetAttributes
virtual OdUInt32 subSetAttributes(OdGiDrawableTraits *traits) const
Definition: daiEntityInstance.h:207
OdSmartPtr
Definition: SmartPtr.h:58
OdDAI::AttributePtr
OdSmartPtr< Attribute > AttributePtr
Definition: daiEntityInstance.h:40
OdDAI::EntityInstance::m_id
OdDbStub * m_id
Definition: daiEntityInstance.h:209
OdGiDrawable
Definition: GiDrawable.h:49
OdaCommon.h
eNotImplemented
#define eNotImplemented
OdGiWorldDraw
Definition: GiWorldDraw.h:44
OdGiDrawableTraits
Definition: Gi.h:71
GiDrawable.h
OdError
Definition: OdError.h:43
OdDAI::Model
Definition: daiModel.h:63
DAI_EXPORT
#define DAI_EXPORT
Definition: daiBuildOptions.h:28
ODRX_DECLARE_MEMBERS
#define ODRX_DECLARE_MEMBERS(ClassName)
Definition: RxObject.h:112
OdGiViewportDraw
Definition: GiViewportDraw.h:50