CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
DbBaseSubentId.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
25
26
27#ifndef ODDB_DBBASESUBENT_H
28#define ODDB_DBBASESUBENT_H
30#include "TD_PackPush.h"
31
32#include "DbRootExport.h"
33#include "DbStubPtrArray.h"
34
35namespace OdDb
36{
42 {
43 kNullSubentType = 0, //Null
47 kMlineSubentCache, //Multiline
48 kClassSubentType //Other
49 };
50}
51
76{
77public:
78
84 : m_Type(OdDb::kNullSubentType)
85 , m_Index(0)
86 {}
87
95 : m_Type(type)
96 , m_Index(index)
97 {}
98
107 bool operator ==(const OdDbSubentId& subentId) const
108 {
109 return ((m_Index == subentId.m_Index) && (m_Type == subentId.m_Type));
110 }
111
120 bool operator !=(const OdDbSubentId& subentId) const
121 {
122 return ((m_Index != subentId.m_Index) || (m_Type != subentId.m_Type));
123 }
124
143 {
144 return m_Type;
145 }
146
165 {
166 m_Type = type;
167 }
168
175 {
176 return m_Index;
177 }
178
185 {
186 m_Index = index;
187 }
188
189private:
190 OdDb::SubentType m_Type;
191 OdGsMarker m_Index;
192};
193
208{
209public:
210
215 {}
216
225 : m_SubentId(type, index)
226 {}
227
234 OdDbBaseFullSubentPath(OdDbStub* entId, OdDbSubentId subId)
235 : m_SubentId(subId)
236 {
237 m_ObjectIds.clear();
238 m_ObjectIds.append(entId) ;
239 }
240
250 : m_SubentId(type, index)
251 {
252 m_ObjectIds.clear();
253 m_ObjectIds.append(entId) ;
254 }
255
263 : m_ObjectIds(objectIds)
264 , m_SubentId(subId)
265 {
266 }
267
273 void objectIds(OdDbStubPtrArray& objectIdsArg) const
274 {
275 objectIdsArg = m_ObjectIds;
276 }
277
287 OdDbBaseFullSubentPath& operator =(const OdDbBaseFullSubentPath& fullSubentPath)
288 {
289 m_ObjectIds = fullSubentPath.objectIds();
290 m_SubentId = fullSubentPath.subentId();
291 return *this;
292 }
293
302 bool operator==(const OdDbBaseFullSubentPath& fullSubentPath) const
303 {
304 return m_ObjectIds == fullSubentPath.objectIds() && m_SubentId == fullSubentPath.subentId();
305 }
306
313 {
314 return m_ObjectIds;
315 }
316
323 {
324 return m_ObjectIds;
325 }
326
332 const OdDbSubentId subentId() const
333 {
334 return m_SubentId;
335 }
336
343 {
344 return m_SubentId;
345 }
346
347protected:
350};
351
356
369
380{
381public:
382
394 virtual OdRxObject* resolve(OdRxObject* pRxDb) = 0;
395};
396
406
416#include "TD_PackPop.h"
417
418#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
Definition: DbRootExport.h:39
bool operator!=(T left, const OdGiVariant::EnumType right)
Definition: GiVariant.h:403
bool operator==(T left, const OdGiVariant::EnumType right)
Definition: GiVariant.h:397
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)
OdDb::SubentType type() const
OdDbSubentId(OdDb::SubentType type, OdGsMarker index)
void setIndex(OdGsMarker index)
void setType(OdDb::SubentType type)
OdGsMarker index() const
GLuint index
Definition: gles2_ext.h:265
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
@ kVertexSubentType
@ kFaceSubentType
@ kEdgeSubentType
@ kClassSubentType
@ kMlineSubentCache
@ kNullSubentType