CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
DbBaseSubentId.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2024, 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-2024 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
25
26
27#ifndef ODDB_DBBASESUBENT_H
28#define ODDB_DBBASESUBENT_H
29
30#include "TD_PackPush.h"
31
32#include "DbRootExport.h"
33#include "DbStubPtrArray.h"
34#include "RxDictionary.h"
35
36namespace OdDb
37{
52}
53
80{
81public:
82
88 : m_Type(OdDb::kNullSubentType)
89 , m_Index(0)
90 {}
91
99 : m_Type(type)
100 , m_Index(index)
101 {}
102
110 : m_Type(OdDb::kClassSubentType)
111 , m_Index(index)
112 , m_Class(clazz->name())
113 {}
114
123 bool operator ==(const OdDbSubentId& subentId) const
124 {
125 return ((m_Index == subentId.m_Index) && (m_Type == subentId.m_Type) && (m_Class == subentId.m_Class));
126 }
127
136 bool operator !=(const OdDbSubentId& subentId) const
137 {
138 return ((m_Index != subentId.m_Index) || (m_Type != subentId.m_Type) || (m_Class != subentId.m_Class));
139 }
140
161 {
162 return m_Type;
163 }
164
185 {
186 m_Type = type;
187 if (m_Type != OdDb::kClassSubentType)
188 m_Class = OdString::kEmpty;
189 }
190
197 {
198 return m_Index;
199 }
200
207 {
208 m_Index = index;
209 }
210
217 {
218 return ::odrxGetClassDesc(m_Class);
219 }
220
227 {
228 m_Type = OdDb::kClassSubentType;
229 m_Class = clazz->name();
230 }
231
232private:
233 OdDb::SubentType m_Type;
234 OdGsMarker m_Index;
235 OdString m_Class;
236};
237
252{
253public:
254
260
271
278 OdDbBaseFullSubentPath(OdDbStub* entId, OdDbSubentId subId)
279 : m_SubentId(subId)
280 {
281 m_ObjectIds.clear();
282 m_ObjectIds.append(entId) ;
283 }
284
295 {
296 m_ObjectIds.clear();
297 m_ObjectIds.append(entId) ;
298 }
299
311
317 void objectIds(OdDbStubPtrArray& objectIdsArg) const
318 {
319 objectIdsArg = m_ObjectIds;
320 }
321
331 OdDbBaseFullSubentPath& operator =(const OdDbBaseFullSubentPath& fullSubentPath)
332 {
333 m_ObjectIds = fullSubentPath.objectIds();
334 m_SubentId = fullSubentPath.subentId();
335 return *this;
336 }
337
346 bool operator==(const OdDbBaseFullSubentPath& fullSubentPath) const
347 {
348 return m_ObjectIds == fullSubentPath.objectIds() && m_SubentId == fullSubentPath.subentId();
349 }
350
357 {
358 return m_ObjectIds;
359 }
360
367 {
368 return m_ObjectIds;
369 }
370
376 const OdDbSubentId subentId() const
377 {
378 return m_SubentId;
379 }
380
387 {
388 return m_SubentId;
389 }
390
391protected:
394};
395
400
413
423class OdBaseDatabaseByResolver : public OdRxObject
424{
425public:
426
438 virtual OdRxObject* resolve(OdRxObject* pRxDb) = 0;
439};
440
450
460#include "TD_PackPop.h"
461
462#endif
DBROOT_EXPORT void removeBaseDatabaseByResolver(OdBaseDatabaseByResolver *pResolver)
DBROOT_EXPORT void addBaseDatabaseByResolver(OdBaseDatabaseByResolver *pResolver)
OdArray< OdDbBaseFullSubentPath > OdDbBaseFullSubentPathArray
DBROOT_EXPORT OdRxObject * baseDatabaseBy(OdDbStub *id)
#define DBROOT_EXPORT
OdArray< OdDbStub *, OdMemoryAllocator< OdDbStub * > > OdDbStubPtrArray
bool operator!=(T left, const OdGiVariant::EnumType right)
Definition GiVariant.h:405
bool operator==(T left, const OdGiVariant::EnumType right)
Definition GiVariant.h:399
ptrdiff_t OdGsMarker
virtual OdRxObject * resolve(OdRxObject *pRxDb)=0
bool operator==(const OdDbBaseFullSubentPath &fullSubentPath) const
void objectIds(OdDbStubPtrArray &objectIdsArg) const
OdDbBaseFullSubentPath(OdDbStubPtrArray objectIds, OdDbSubentId subId)
OdDbStubPtrArray m_ObjectIds
OdDbBaseFullSubentPath(OdDbStub *entId, OdDbSubentId subId)
OdDbStubPtrArray & objectIds()
OdDbBaseFullSubentPath(OdDb::SubentType type, OdGsMarker index)
OdDbSubentId & subentId()
const OdDbSubentId subentId() const
const OdDbStubPtrArray & objectIds() const
OdDbBaseFullSubentPath(OdDbStub *entId, OdDb::SubentType type, OdGsMarker index)
void setTypeClass(OdRxClass *clazz)
OdDb::SubentType type() const
OdRxClass * typeClass() const
OdDbSubentId(OdDb::SubentType type, OdGsMarker index)
OdDbSubentId(OdRxClass *clazz, OdGsMarker index)
void setIndex(OdGsMarker index)
void setType(OdDb::SubentType type)
OdGsMarker index() const
const OdString name() const
FIRSTDLL_EXPORT_STATIC static const OdString kEmpty
Definition OdString.h:100
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
@ kVertexSubentType
@ kAxisSubentType
@ kFaceSubentType
@ kEdgeSubentType
@ kClassSubentType
@ kMlineSubentCache
@ kNullSubentType