CFx SDK Documentation  2023 SP0
DbBaseSubentId.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, 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-2017 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 
35 namespace OdDb
36 {
38  {
45  };
46 }
47 
72 {
73 public:
75  : m_Type(OdDb::kNullSubentType)
76  , m_Index(0)
77  {}
78 
80  : m_Type(type)
81  , m_Index(index)
82  {}
83 
84  bool operator ==(const OdDbSubentId& subentId) const
85  {
86  return ((m_Index == subentId.m_Index) && (m_Type == subentId.m_Type));
87  }
88 
89  bool operator !=(const OdDbSubentId& subentId) const
90  {
91  return ((m_Index != subentId.m_Index) || (m_Type != subentId.m_Type));
92  }
93 
111  {
112  return m_Type;
113  }
114 
133  {
134  m_Type = type;
135  }
139  OdGsMarker index() const
140  {
141  return m_Index;
142  }
143 
149  {
150  m_Index = index;
151  }
152 
153 private:
154  OdDb::SubentType m_Type;
155  OdGsMarker m_Index;
156 };
157 
172 {
173 public:
175  {}
177  : m_SubentId(type, index)
178  {}
179  OdDbBaseFullSubentPath(OdDbStub* entId, OdDbSubentId subId)
180  : m_SubentId(subId)
181  {
182  m_ObjectIds.clear();
183  m_ObjectIds.append(entId) ;
184  }
185 
187  : m_SubentId(type, index)
188  {
189  m_ObjectIds.clear();
190  m_ObjectIds.append(entId) ;
191  }
192 
194  : m_ObjectIds(objectIds)
195  , m_SubentId(subId)
196  {
197  }
198 
199  void objectIds(OdDbStubPtrArray& objectIdsArg) const
200  {
201  objectIdsArg = m_ObjectIds;
202  }
203 
204  OdDbBaseFullSubentPath& operator =(const OdDbBaseFullSubentPath& fullSubentPath)
205  {
206  m_ObjectIds = fullSubentPath.objectIds();
207  m_SubentId = fullSubentPath.subentId();
208  return *this;
209  }
210 
211  bool operator==(const OdDbBaseFullSubentPath& fullSubentPath) const
212  {
213  return m_ObjectIds == fullSubentPath.objectIds() && m_SubentId == fullSubentPath.subentId();
214  }
215 
220  {
221  return m_ObjectIds;
222  }
223 
228  {
229  return m_ObjectIds;
230  }
231 
235  const OdDbSubentId subentId() const
236  {
237  return m_SubentId;
238  }
239 
244  {
245  return m_SubentId;
246  }
247 
248 protected:
251 };
252 
257 
259 
260 #include "TD_PackPop.h"
261 
262 #endif
OdArray< OdDbBaseFullSubentPath > OdDbBaseFullSubentPathArray
DBROOT_EXPORT OdRxObject * baseDatabaseBy(OdDbStub *id)
#define DBROOT_EXPORT
Definition: DbRootExport.h:39
ptrdiff_t OdGsMarker
bool operator==(const OdDbBaseFullSubentPath &fullSubentPath) const
void objectIds(OdDbStubPtrArray &objectIdsArg) const
OdDbBaseFullSubentPath(OdDbStubPtrArray objectIds, OdDbSubentId subId)
OdDbStubPtrArray m_ObjectIds
OdDbBaseFullSubentPath(OdDbStub *entId, OdDbSubentId subId)
const OdDbStubPtrArray & objectIds() const
OdDbBaseFullSubentPath(OdDb::SubentType type, OdGsMarker index)
const OdDbSubentId subentId() const
OdDbSubentId & subentId()
OdDbStubPtrArray & objectIds()
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
bool operator==(const BlockRefPath &rA, const BlockRefPath &rB)
DOM.
bool operator!=(const BlockRefPath &rA, const BlockRefPath &rB)
DOM.
@ kVertexSubentType
@ kFaceSubentType
@ kEdgeSubentType
@ kClassSubentType
@ kMlineSubentCache
@ kNullSubentType