CFx SDK Documentation  2023 SP0
AECPropertyDef.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 __AECPROPERTYDEF_H__
25 #define __AECPROPERTYDEF_H__
26 
27 #include "Subobjects/AECUnitType.h"
28 #include "Common/AECQueryInfo.h"
29 #include "Common/AECVariant.h"
30 
36 class AECSCHEDULEDATA_API AECPropertyDef : public AECImpObj
37 {
39 
40  public:
44  enum Type
45  {
46  eInteger = 0,
47  eReal = 1,
48  eText = 2,
49  eBool = 3,
50  eAutoIncrement = 4,
51  eCharIncrement = 5,
52  eList = 6,
53  eGraphics = 7
54  };
55 
57  // Common property definition flags
58  // structure.
59 
60  public:
64  OdUInt32 GetIndex() const;
65 
69  void SetIndex( OdUInt32 iIndex );
70 
74  const OdString& GetName() const;
75 
79  void SetName( const OdString& strName );
80 
84  const OdString& GetGlobalName() const;
85 
89  void SetGlobalName(const OdString& gname);
90 
94  Type GetType() const;
95 
99  void SetType( Type eType );
100 
104  bool IsAutomatic() const;
105 
109  void SetIsAutomatic( bool bIsAutomatic );
110 
115 
124  const AECQueryInfo& GetQueryInfoByIndex( OdUInt32 iIndex ) const;
125 
129  void AddQueryInfo( const AECQueryInfo& cQueryInfo );
130 
134  void AddQueryInfo( OdRxClass* pDesc, const OdString& strPropertyName );
135 
145 
150 
156 
161  void SetDataFormat( OdDbObjectId idDataFormat );
162 
166  const AECVariant& GetDefaultValue() const;
167 
171  void SetDefaultValue( const AECVariant& vtValue );
172 
181 
190 
198  void SetUseNameAsDesctiption( bool bUseNameAsDesctiption );
199 
202  bool IsReadOnly() const;
203 
206  void SetReadOnly( bool bReadOnly );
207 
210  bool IsVisible() const;
211 
214  void SetVisible( bool bVisible );
215 
218  bool IsLocked() const;
219 
222  void SetLocked( bool bLocked );
223 
228 
232  void SetOrder( OdUInt32 iOrder );
233 
238  bool IsAppliedTo( const OdString& strClassName, AECQueryInfo* rQueryInfo ) const;
239 
242  bool IsDefaultUnspecified() const;
243 
246  void SetDefaultIsUnspecified( bool bUnspec );
247  protected:
248  //
250 
251  //
253 
254  //
256 
257  //
259 
260  //
261  std::vector<AECQueryInfo> m_aQueryInformation;
262 
263  //
265 
266  //
268 
269  //
271 
272  //
274 
275  //
278 
279  //
281 
282  enum Flags
283  {
284  kLocked = 1,
285  kVisible = 2,
286  kReadOnly = 4,
287  };
289 
290  //
292 
293  // Dev.note: Serialized in derived classes
295 
296  // For internal use.
298 };
299 
302 
303 #endif // __AECPROPERTYDEF_H__
#define AEC_DECLARE_MEMBERS(ClassName)
Definition: AECMacros.h:54
OdSmartPtr< AECPropertyDef > AECPropertyDefPtr
AECSubPtr< AECPropertyDef > AECPropertyDefSubPtr
@ kVisible
Definition: BrEnums.h:114
unsigned int OdUInt32
unsigned char OdUInt8
Type GetType() const
OdDbHardPointerId m_hpidScheduleDataFormat
bool IsAutomatic() const
void ClearQueryInfos()
void SetDataFormat(OdDbObjectId idDataFormat)
AECVariant GetInitialValue() const
void SetUseNameAsDesctiption(bool bUseNameAsDesctiption)
void RemoveQueryInfoByIndex(OdUInt32 iIndex)
void SetName(const OdString &strName)
void SetOrder(OdUInt32 iOrder)
OdUInt32 GetOrder() const
bool IsVisible() const
void SetLocked(bool bLocked)
const AECQueryInfo & GetQueryInfoByIndex(OdUInt32 iIndex) const
OdDbHardPointerId m_hpidListItem
void SetDefaultValue(const AECVariant &vtValue)
OdDbHardPointerId m_hpidList
void SetDefaultIsUnspecified(bool bUnspec)
OdUInt32 GetIndex() const
DOM.
bool IsDefaultUnspecified() const
AECVariant m_vDefaultValue
std::vector< AECQueryInfo > m_aQueryInformation
void SetGlobalName(const OdString &gname)
const OdString & GetName() const
void AddQueryInfo(const AECQueryInfo &cQueryInfo)
OdUInt32 GetQueryInfoCount() const
void AddQueryInfo(OdRxClass *pDesc, const OdString &strPropertyName)
void SetVisible(bool bVisible)
OdString m_strName
bool GetUseNameAsDesctiption() const
void SetIndex(OdUInt32 iIndex)
bool IsLocked() const
const OdString & GetGlobalName() const
OdString m_sGlobalName
bool IsAppliedTo(const OdString &strClassName, AECQueryInfo *rQueryInfo) const
bool IsReadOnly() const
void SetIsAutomatic(bool bIsAutomatic)
AECUnitType m_unitType
OdDbObjectId GetDataFormat() const
void SetType(Type eType)
void SetReadOnly(bool bReadOnly)
const AECVariant & GetDefaultValue() const