CFx SDK Documentation  2020SP3
RxMember.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2018, 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 Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2018 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 _ODRXMEMBER_INCLUDED_
25 #define _ODRXMEMBER_INCLUDED_
26 
27 #include "OdString.h"
28 #include "OdArray.h"
29 #include "RxOverrule.h"
30 #include "SharedPtr.h"
31 
32 class OdRxValue;
33 class OdRxValueType;
36 
37 class OdRxMemberIteratorImpl;
38 class OdRxMemberQueryContextImpl;
39 class OdRxMemberQueryEngineImpl;
40 class OdRxMemberImpl;
41 class OdRxMemberCollectionImpl;
42 
43 class OdRxMember;
45 
52 {
53 public:
55 
59  const OdString& name() const throw();
60 
64  OdString localName() const throw();
65 
69  const OdRxValueType& type()const throw();
70 
75  const OdRxAttributeCollection& attributes() const throw();
76  OdRxAttributeCollection& attributes() throw();
77 
81  const OdRxObject* owner() const throw();
82 
86  const OdArray<OdRxMemberPtr>* children() const throw();
87 
91  static void deleteMember(const OdRxMember* pMember) throw();
92 protected:
93  friend class OdRxMemberImpl;
94  virtual ~OdRxMember();
95  OdRxMember(OdRxMemberImpl*);
96 
100  virtual OdString subLocalName() const;
101 
106  virtual OdResult subChildren(OdArray<OdRxMemberPtr>& children) const;
107 
111  virtual OdResult subChildrenEx(OdArray<OdRxMemberPtr>*& pChildren) const;
112 
116  void init(const OdString& name, const OdRxValueType* type, const OdRxObject* owner = 0);
117  OdRxMemberImpl* m_pImpl;
118 };
119 
120 
121 class OdRxEnumTag;
123 class OdRxEnumTagImpl;
124 
130 {
131 public:
139  static OdRxEnumTagPtr createObject(const OdChar* name, const OdRxValue& value, const OdRxObject* owner);
140 
144  const OdRxValue& value() const;
145 
150 protected:
151  OdRxEnumTag(OdRxMemberImpl*);
156 };
157 
163 {
164 public:
169  virtual int count() const = 0;
173  virtual OdRxMember* getAt(int index) const = 0;
174 };
175 
181 {
182 public:
186  void add(OdRxMember* member);
187 
191  const OdRxClass* owner() const { return m_owner; }
192 private:
193  friend class OdRxMemberCollectionImpl;
194  OdRxMemberCollectionBuilder(OdRxMemberCollectionImpl* imp, const OdRxClass* owner) : m_pImpl(imp), m_owner(owner) {}
195  const OdRxClass* m_owner;
196  OdRxMemberCollectionImpl* m_pImpl;
197 };
198 
204 {
205 public:
210  virtual bool done();
214  virtual bool next();
218  virtual OdRxMember* current() const;
222  virtual OdRxMember* find(const OdChar* name) const;
223 protected:
225 private:
226  friend class OdRxMemberIteratorImpl;
227  OdRxMemberIteratorImpl* m_pImpl;
228 };
229 
231 
232 
240 {
241 public:
248 protected:
249  friend class OdRxMemberQueryContextImpl;
250  OdRxMemberQueryContextImpl* m_pImpl;
254 };
255 
256 
262 {
264 
269  virtual void getFacets(const OdRxObject* pO, const OdRxMemberQueryContext* pContext, OdArray<OdRxClassPtr>& facets) = 0;
270 };
271 
273 
279 {
280 public:
281  virtual ~OdRxMemberReactor() {}
285  virtual void goodbye(const OdRxMember* ) {}
286 };
287 
288 
294 {
295 public:
300 
304  OdRxMember* find(const OdRxObject* pO, const OdChar* name, const OdRxMemberQueryContext* pContext = NULL) const;
305 
310 
316 
323 
328 
333 
337  void addReactor(OdRxMemberReactor* pReactor);
338 
343 private:
344  friend class OdRxMemberQueryEngineImpl;
345  OdRxMemberQueryEngineImpl* m_pImpl;
346  OdRxMemberQueryEngine(OdRxMemberQueryEngineImpl*);
347 };
348 
349 
357 {
358 public:
363  static OdResult addOverrule(OdRxMember* pOverruledSubject, OdRxMemberOverrule* pOverrule, bool bAddAtLast = false);
367  static OdResult removeOverrule(OdRxMember* pOverruledSubject, OdRxMemberOverrule* pOverrule);
368 };
369 
370 #endif
OdRxMemberIterator::current
virtual OdRxMember * current() const
FIRSTDLL_EXPORT
#define FIRSTDLL_EXPORT
Definition: RootExport.h:39
OdRxMemberCollection
Definition: RxMember.h:163
OdResult
OdResult
Definition: OdResult.h:29
OdRxFacetProvider
Definition: RxMember.h:262
OdRxEnumTag::value
const OdRxValue & value() const
OdRxMemberCollectionBuilder
Definition: RxMember.h:181
OdRxMemberQueryEngine::theEngine
static OdRxMemberQueryEngine * theEngine()
OdRxMember
Definition: RxMember.h:52
OdString
Definition: OdString.h:95
NULL
#define NULL
Definition: GsProperties.h:177
OdRxMemberQueryEngine::addFacetProvider
void addFacetProvider(OdRxFacetProvider *pProvider)
OdRxEnumTag::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdRxEnumTag)
OdRxMemberQueryContext::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdRxMemberQueryContext)
OdRxMember::name
const OdString & name() const
OdRxMemberOverrule::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdRxMemberOverrule)
name
GLuint const GLchar * name
Definition: gles2_ext.h:265
OdRxMemberIterator::next
virtual bool next()
OdRxMemberIterator::OdRxMemberIterator
OdRxMemberIterator()
OdRxMemberIterator::~OdRxMemberIterator
virtual ~OdRxMemberIterator()
OdRxMemberReactor::~OdRxMemberReactor
virtual ~OdRxMemberReactor()
Definition: RxMember.h:281
OdRxMemberOverrule::removeOverrule
static OdResult removeOverrule(OdRxMember *pOverruledSubject, OdRxMemberOverrule *pOverrule)
type
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
OdRxMemberCollection::~OdRxMemberCollection
virtual ~OdRxMemberCollection()
OdRxMemberReactor
Definition: RxMember.h:279
OdSharedPtr
Definition: SharedPtr.h:49
OdRxObject
Definition: RxObject.h:564
OdRxPromotingQueryContext
Definition: RxProperty.h:142
OdRxMemberQueryEngine::promotingContext
const OdRxPromotingQueryContext * promotingContext() const
OdRxMemberQueryEngine
Definition: RxMember.h:294
OdRxEnumTag
Definition: RxMember.h:130
OdRxMemberQueryContext
Definition: RxMember.h:240
OdArray
Definition: OdArray.h:591
OdRxMemberQueryEngine::removeFacetProvider
void removeFacetProvider(OdRxFacetProvider *pProvider)
OdRxEnumTag::subAlternateLocalName
virtual OdString subAlternateLocalName() const
index
GLuint index
Definition: gles2_ext.h:265
OdRxValue
Definition: RxValue.h:64
OdRxEnumTag::alternateLocalName
OdString alternateLocalName() const
OdRxMemberQueryEngine::removeReactor
void removeReactor(OdRxMemberReactor *pReactor)
OdRxMemberQueryEngine::addReactor
void addReactor(OdRxMemberReactor *pReactor)
OdString.h
OdRxClass
Definition: RxObject.h:865
OdRxMemberQueryEngine::find
OdRxMember * find(const OdRxObject *pO, const OdChar *name, const OdRxMemberQueryContext *pContext=NULL) const
OdRxMemberReactor::goodbye
virtual void goodbye(const OdRxMember *)
Definition: RxMember.h:285
OdArray.h
OdRxMemberIterator::done
virtual bool done()
OdSmartPtr
Definition: SmartPtr.h:58
OdRxMemberQueryEngine::newMemberIterator
OdRxMemberIteratorPtr newMemberIterator(const OdRxObject *pO, const OdRxMemberQueryContext *pContext=NULL) const
OdRxMemberCollectionBuilder::owner
const OdRxClass * owner() const
Definition: RxMember.h:191
OdRxMemberQueryEngine::defaultContext
const OdRxMemberQueryContext * defaultContext() const
OdRxMemberCollection::getAt
virtual OdRxMember * getAt(int index) const =0
OdChar
wchar_t OdChar
Definition: OdPlatformSettings.h:745
SharedPtr.h
OdRxFacetProviderPtr
OdSmartPtr< OdRxFacetProvider > OdRxFacetProviderPtr
Definition: RxMember.h:272
OdRxMemberIteratorPtr
OdSharedPtr< OdRxMemberIterator > OdRxMemberIteratorPtr
Definition: RxMember.h:230
OdRxMemberQueryContext::~OdRxMemberQueryContext
virtual ~OdRxMemberQueryContext()
OdRxMemberCollectionBuilder::add
void add(OdRxMember *member)
OdRxValueType
Definition: RxValueType.h:137
ODRX_ABSTRACT
#define ODRX_ABSTRACT
Definition: OdPlatformSettings.h:117
OdRxMemberPtr
OdSmartPtr< OdRxMember > OdRxMemberPtr
Definition: RxMember.h:43
OdRxMemberCollection::count
virtual int count() const =0
OdRxMember::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdRxMember)
OdRxFacetProvider::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdRxFacetProvider)
value
GLsizei const GLfloat * value
Definition: gles2_ext.h:302
OdRxMemberIterator::find
virtual OdRxMember * find(const OdChar *name) const
OdRxFacetProvider::getFacets
virtual void getFacets(const OdRxObject *pO, const OdRxMemberQueryContext *pContext, OdArray< OdRxClassPtr > &facets)=0
OdRxMemberOverrule
Definition: RxMember.h:357
OdRxMemberQueryContext::m_pImpl
OdRxMemberQueryContextImpl * m_pImpl
Definition: RxMember.h:250
OdRxMemberOverrule::addOverrule
static OdResult addOverrule(OdRxMember *pOverruledSubject, OdRxMemberOverrule *pOverrule, bool bAddAtLast=false)
RxOverrule.h
OdRxEnumTag::OdRxEnumTag
OdRxEnumTag(OdRxMemberImpl *)
OdRxAttributeCollection
Definition: RxAttribute.h:71
OdRxMemberIterator
Definition: RxMember.h:204
OdRxMemberQueryContext::newMemberIterator
OdRxMemberIteratorPtr newMemberIterator(const OdArray< OdRxClassPtr > &facets) const
OdRxMemberQueryContext::subNewMemberIterator
virtual OdRxMemberIteratorPtr subNewMemberIterator(const OdArray< OdRxClassPtr > &facets) const =0
OdRxMemberQueryContext::OdRxMemberQueryContext
OdRxMemberQueryContext()
OdRxEnumTag::createObject
static OdRxEnumTagPtr createObject(const OdChar *name, const OdRxValue &value, const OdRxObject *owner)