CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
DbSubentId.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_DBSUBENT_H
28#define ODDB_DBSUBENT_H
30#include "DbBaseSubentId.h"
31#include "DbObjectId.h"
32#include "IdArrays.h"
33#define STL_USING_FUNCTIONAL
34#include "OdaSTL.h"
35
51{
52public:
54 {
55 }
58 {
59 }
61 : OdDbBaseFullSubentPath(entId, subId)
62 {
63 }
66 {
67 }
69 : OdDbBaseFullSubentPath(*reinterpret_cast<OdDbStubPtrArray*>(&objectIds), subId)
70 {
71 }
73 : OdDbBaseFullSubentPath(objectIds, subId)
74 {
75 }
77 : OdDbBaseFullSubentPath(basePath)
78 {
79 }
80
84 void objectIds(OdDbObjectIdArray& objectIdsArg) const
85 {
86 objectIdsArg = *reinterpret_cast<const OdDbObjectIdArray*>(&m_ObjectIds);
87 }
88
90 {
92 return *this;
93 }
94
95 bool operator==(const OdDbFullSubentPath& fullSubentPath) const
96 {
97 return OdDbBaseFullSubentPath::operator==(fullSubentPath);
98 }
99
104 {
105 return *reinterpret_cast<const OdDbObjectIdArray*>(&m_ObjectIds);
106 }
107
112 {
113 return *reinterpret_cast<OdDbObjectIdArray*>(&m_ObjectIds);
114 }
115
119 const OdDbSubentId subentId() const
120 {
121 return m_SubentId;
122 }
123
128 {
129 return m_SubentId;
130 }
138 struct less
139 {
140 bool operator()(const OdDbFullSubentPath & fsp1, const OdDbFullSubentPath & fsp2) const
141 {
142 const OdDbSubentId & sid1 = fsp1.subentId();
143 const OdDbSubentId & sid2 = fsp2.subentId();
144 if (sid1.index() != sid2.index())
145 return sid1.index() < sid2.index();
146 if (sid1.type() != sid2.type())
147 return sid1.type() < sid2.type();
148 const OdDbObjectIdArray & oids1 = fsp1.objectIds();
149 const OdDbObjectIdArray & oids2 = fsp2.objectIds();
150 const int len1 = oids1.length();
151 const int len2 = oids2.length();
152 if (len1 != len2)
153 return len1 < len2;
154 for (int i = 0; i < len1; ++i)
155 {
156 const OdDbObjectId & oid1 = oids1[i];
157 const OdDbObjectId & oid2 = oids2[i];
158 if (oid1 != oid2)
159 return oid1 < oid2;
160 }
161 return false;
162 }
163 };
164};
165
170
171#endif
172
173
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdArray< OdDbFullSubentPath > OdDbFullSubentPathArray
Definition: DbSubentId.h:169
ptrdiff_t OdGsMarker
size_type length() const
Definition: OdArray.h:1537
bool operator==(const OdDbBaseFullSubentPath &fullSubentPath) const
OdDbStubPtrArray m_ObjectIds
OdDbBaseFullSubentPath & operator=(const OdDbBaseFullSubentPath &fullSubentPath)
OdDbFullSubentPath(OdDbObjectIdArray objectIds, OdDbSubentId subId)
Definition: DbSubentId.h:68
bool operator==(const OdDbFullSubentPath &fullSubentPath) const
Definition: DbSubentId.h:95
OdDbSubentId & subentId()
Definition: DbSubentId.h:127
void objectIds(OdDbObjectIdArray &objectIdsArg) const
Definition: DbSubentId.h:84
OdDbFullSubentPath(OdDbObjectId entId, OdDb::SubentType type, OdGsMarker index)
Definition: DbSubentId.h:64
const OdDbSubentId subentId() const
Definition: DbSubentId.h:119
OdDbFullSubentPath(OdDbStubPtrArray objectIds, OdDbSubentId subId)
Definition: DbSubentId.h:72
OdDbFullSubentPath(OdDbObjectId entId, OdDbSubentId subId)
Definition: DbSubentId.h:60
OdDbFullSubentPath(OdDb::SubentType type, OdGsMarker index)
Definition: DbSubentId.h:56
OdDbFullSubentPath(const OdDbBaseFullSubentPath &basePath)
Definition: DbSubentId.h:76
OdDbObjectIdArray & objectIds()
Definition: DbSubentId.h:111
const OdDbObjectIdArray & objectIds() const
Definition: DbSubentId.h:103
OdDb::SubentType type() const
OdGsMarker index() const
GLuint index
Definition: gles2_ext.h:265
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
bool operator()(const OdDbFullSubentPath &fsp1, const OdDbFullSubentPath &fsp2) const
Definition: DbSubentId.h:140