CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
RxMember.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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-2022 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//DOM-IGNORE-BEGIN
33class OdRxValue;
34class OdRxValueType;
37
38class OdRxMemberIteratorImpl;
39class OdRxMemberQueryContextImpl;
40class OdRxMemberQueryEngineImpl;
41class OdRxMemberImpl;
42class OdRxMemberCollectionImpl;
43
44class OdRxMember;
45//DOM-IGNORE-END
46
52
59{
60public:
61//DOM-IGNORE-BEGIN
63//DOM-IGNORE-END
64
71 const OdString& name() const throw();
72
79 OdString localName() const throw();
80
87 const OdRxValueType& type()const throw();
88
97 const OdRxAttributeCollection& attributes() const throw();
98
107 OdRxAttributeCollection& attributes() throw();
108
117 const OdRxObject* owner() const throw();
118
128 const OdArray<OdRxMemberPtr>* children() const throw();
129
138 static void deleteMember(const OdRxMember* pMember) throw();
139protected:
140 friend class OdRxMemberImpl;
141 virtual ~OdRxMember();
142 OdRxMember(OdRxMemberImpl*);
143
147 virtual OdString subLocalName() const;
148
158 virtual OdResult subChildren(OdArray<OdRxMemberPtr>& children) const;
159
167 virtual OdResult subChildrenEx(OdArray<OdRxMemberPtr>*& pChildren) const;
168
175 void init(const OdString& name, const OdRxValueType* type, const OdRxObject* owner = 0);
176 OdRxMemberImpl* m_pImpl;
177};
178
179//DOM-IGNORE-BEGIN
180class OdRxEnumTag;
181//DOM-IGNORE-END
182
188//DOM-IGNORE-BEGIN
189class OdRxEnumTagImpl;
190//DOM-IGNORE-END
191
197{
198public:
199//DOM-IGNORE-BEGIN
201//DOM-IGNORE-END
202
213 static OdRxEnumTagPtr createObject(const OdChar* name, const OdRxValue& value, const OdRxObject* owner);
214
221 const OdRxValue& value() const;
222
231protected:
232 OdRxEnumTag(OdRxMemberImpl*);
237};
238
244{
245public:
246
251
258 virtual int count() const = 0;
259
268 virtual OdRxMember* getAt(int index) const = 0;
269};
270
276{
277public:
278
284 void add(OdRxMember* member);
285
292 const OdRxClass* owner() const { return m_owner; }
293private:
294 friend class OdRxMemberCollectionImpl;
295 OdRxMemberCollectionBuilder(OdRxMemberCollectionImpl* imp, const OdRxClass* owner) : m_pImpl(imp), m_owner(owner) {}
296 const OdRxClass* m_owner;
297 OdRxMemberCollectionImpl* m_pImpl;
298};
299
305{
306public:
307
312
319 virtual bool done();
320
327 virtual bool next();
328
335 virtual OdRxMember* current() const;
336
346 virtual OdRxMemberPtr find(const OdChar* name) const;
347
353 virtual OdUInt64 size() const;
354
355protected:
357private:
358 friend class OdRxMemberIteratorImpl;
359 OdRxMemberIteratorImpl* m_pImpl;
360};
361
367
376{
377public:
378//DOM-IGNORE-BEGIN
380//DOM-IGNORE-END
381
394
404 virtual OdRxMemberPtr find(const OdArray<OdRxClassPtr>& facets, const OdChar* name) const;
405protected:
406 friend class OdRxMemberQueryContextImpl;
407 OdRxMemberQueryContextImpl* m_pImpl;
411};
412
419{
420//DOM-IGNORE-BEGIN
422//DOM-IGNORE-END
423
434 virtual void getFacets(const OdRxObject* pO, const OdRxMemberQueryContext* pContext, OdArray<OdRxClassPtr>& facets) = 0;
435};
436
442
448{
449public:
450
455
459 virtual void goodbye(const OdRxMember* ) {}
460};
461
462
469{
470public:
471
480
494 OdRxMemberPtr find(const OdRxObject* pO, const OdChar* name, const OdRxMemberQueryContext* pContext = NULL, bool bQueryFacets = true) const;
495
507
516
528
536
543
550
557private:
558 friend class OdRxMemberQueryEngineImpl;
559 OdRxMemberQueryEngineImpl* m_pImpl;
560 OdRxMemberQueryEngine(OdRxMemberQueryEngineImpl*);
561};
562
563
571{
572public:
573//DOM-IGNORE-BEGIN
575//DOM-IGNORE-END
576
590 static OdResult addOverrule(OdRxMember* pOverruledSubject, OdRxMemberOverrule* pOverrule, bool bAddAtLast = false);
591
604 static OdResult removeOverrule(OdRxMember* pOverruledSubject, OdRxMemberOverrule* pOverrule);
605};
606
607#endif
#define ODRX_ABSTRACT
wchar_t OdChar
OdResult
Definition: OdResult.h:29
#define FIRSTDLL_EXPORT
Definition: RootExport.h:39
OdSmartPtr< OdRxMember > OdRxMemberPtr
Definition: RxMember.h:51
OdSmartPtr< OdRxFacetProvider > OdRxFacetProviderPtr
Definition: RxMember.h:441
OdSharedPtr< OdRxMemberIterator > OdRxMemberIteratorPtr
Definition: RxMember.h:366
ODRX_DECLARE_MEMBERS(OdRxEnumTag)
const OdRxValue & value() const
OdRxEnumTag(OdRxMemberImpl *)
static OdRxEnumTagPtr createObject(const OdChar *name, const OdRxValue &value, const OdRxObject *owner)
virtual OdString subAlternateLocalName() const
OdString alternateLocalName() const
void add(OdRxMember *member)
const OdRxClass * owner() const
Definition: RxMember.h:292
virtual int count() const =0
virtual ~OdRxMemberCollection()
virtual OdRxMember * getAt(int index) const =0
const OdString & name() const
ODRX_DECLARE_MEMBERS(OdRxMember)
virtual OdUInt64 size() const
virtual ~OdRxMemberIterator()
virtual OdRxMemberPtr find(const OdChar *name) const
virtual OdRxMember * current() const
virtual bool next()
virtual bool done()
ODRX_DECLARE_MEMBERS(OdRxMemberOverrule)
static OdResult addOverrule(OdRxMember *pOverruledSubject, OdRxMemberOverrule *pOverrule, bool bAddAtLast=false)
static OdResult removeOverrule(OdRxMember *pOverruledSubject, OdRxMemberOverrule *pOverrule)
OdRxMemberIteratorPtr newMemberIterator(const OdArray< OdRxClassPtr > &facets) const
virtual OdRxMemberIteratorPtr subNewMemberIterator(const OdArray< OdRxClassPtr > &facets) const =0
ODRX_DECLARE_MEMBERS(OdRxMemberQueryContext)
OdRxMemberQueryContextImpl * m_pImpl
Definition: RxMember.h:407
virtual ~OdRxMemberQueryContext()
virtual OdRxMemberPtr find(const OdArray< OdRxClassPtr > &facets, const OdChar *name) const
static OdRxMemberQueryEngine * theEngine()
const OdRxMemberQueryContext * defaultContext() const
const OdRxPromotingQueryContext * promotingContext() const
OdRxMemberPtr find(const OdRxObject *pO, const OdChar *name, const OdRxMemberQueryContext *pContext=NULL, bool bQueryFacets=true) const
void removeFacetProvider(OdRxFacetProvider *pProvider)
void addFacetProvider(OdRxFacetProvider *pProvider)
OdRxMemberIteratorPtr newMemberIterator(const OdRxObject *pO, const OdRxMemberQueryContext *pContext=NULL) const
void addReactor(OdRxMemberReactor *pReactor)
void removeReactor(OdRxMemberReactor *pReactor)
virtual void goodbye(const OdRxMember *)
Definition: RxMember.h:459
virtual ~OdRxMemberReactor()
Definition: RxMember.h:454
GLuint index
Definition: gles2_ext.h:265
GLuint const GLchar * name
Definition: gles2_ext.h:265
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
GLsizei const GLfloat * value
Definition: gles2_ext.h:302
ODRX_DECLARE_MEMBERS(OdRxFacetProvider)
virtual void getFacets(const OdRxObject *pO, const OdRxMemberQueryContext *pContext, OdArray< OdRxClassPtr > &facets)=0