CFx SDK Documentation  2023 SP0
AECSmartReference.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 #ifndef __AECSMARTREFERENCE_H__
25 #define __AECSMARTREFERENCE_H__
26 
27 #include "AECBase.h"
28 
38 struct AECBASE_API AECSmartReference
39 {
40  public:
59  enum Type
60  {
61  eSimple = 0,
62  eBlock = 1,
63  eBlockReference = 2,
64  eXRef = 3
65  };
66 
67  public:
72  {
73  eType = eSimple;
74  idRef1 = OdDbObjectId::kNull;
75  idRef2 = OdDbObjectId::kNull;
76  cUnk1 = 0;
77  hObject = 0;
78  }
79 
84  static const AECSmartReference createSimple ( const OdDbObjectId& idObj );
85 
92  static const AECSmartReference createWithPath ( const OdDbObjectId& idObj, const OdDbObjectId& idPath );
93 
98  static const AECSmartReference createPathNode ( OdDbDatabase* pPathDB, const OdDbObjectId& idBlockReference );
99 
100  public:
105  bool isNull() const;
106 
111  bool isValid( bool bSkipNotLoadedXREFs = false,
112  const OdRxClass* pTargetClass = 0 ) const;
113 
119 
124 
129  OdResult getTransform( OdGeMatrix3d& mTransform ) const;
130 
131  bool operator == ( const AECSmartReference& rRef ) const;
132  bool operator != ( const AECSmartReference& rRef ) const;
133 
134  public:
135  // Type of smart reference.
137 
138  // Major reference.
140 
141  // Auxiliary reference.
143 
144  // Value in front of handle string
145  // for XRef reference.
147 
148  // Handle for XRef reference.
150 
151  public:
152  AECBASE_API_STATIC static AECSmartReference kNull;
153 };
154 
155 #endif // __AECSMARTREFERENCE_H__
unsigned char OdUInt8
OdResult
Definition: OdResult.h:29
static TOOLKIT_EXPORT_STATIC const OdDbObjectId kNull
Definition: DbObjectId.h:118
bool operator==(const BlockRefPath &rA, const BlockRefPath &rB)
DOM.
bool operator!=(const BlockRefPath &rA, const BlockRefPath &rB)
DOM.
OdDbObjectId getPathId() const
static const AECSmartReference createWithPath(const OdDbObjectId &idObj, const OdDbObjectId &idPath)
OdDbObjectId getTargetId() const
static const AECSmartReference createPathNode(OdDbDatabase *pPathDB, const OdDbObjectId &idBlockReference)
OdResult getTransform(OdGeMatrix3d &mTransform) const
static const AECSmartReference createSimple(const OdDbObjectId &idObj)
bool isNull() const
bool isValid(bool bSkipNotLoadedXREFs=false, const OdRxClass *pTargetClass=0) const
static AECBASE_API_STATIC AECSmartReference kNull