CFx SDK Documentation  2023 SP0
AECVariant.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 __AECVARIANT_H__
25 #define __AECVARIANT_H__
26 
27 #include "AECBase.h"
28 #include "RxVariant.h"
29 
30 class AECVariant;
32 
33 
43 class AECBASE_API AECVariant : protected OdVariant
44 {
45  public:
50 
54  AECVariant( const AECVariant& vValue );
55 
61  AECVariant( OdInt32 iValue );
62 
69  AECVariant( const OdString& strValue,
70  bool bProcessEscapeSequences = false );
71 
77  AECVariant( bool bValue );
78 
84  AECVariant( double dValue );
85 
90 
94  bool operator==( const AECVariant& vtValue ) const;
95 
99  bool operator!=( const AECVariant& vtValue ) const;
100 
104  bool operator>( const AECVariant& vtValue ) const;
105 
109  bool operator<( const AECVariant& vtValue ) const;
110 
114  AECVariant& operator=( const AECVariant& vtValue );
115 
119  AECVariant operator+( const AECVariant& vtValue );
120 
124  AECVariant& operator+=( const AECVariant& vtValue );
125 
129  AECVariant operator-( const AECVariant& vtValue );
130 
134  AECVariant operator*( const AECVariant& vtValue );
135 
139  AECVariant operator/( const AECVariant& vtValue );
140 
144  AECVariant operator&( const AECVariant& vtValue );
145 
149  AECVariant operator&&( const AECVariant& vtValue );
150 
154  AECVariant operator||( const AECVariant& vtValue );
155 
160 
161  public:
165  enum Type
166  {
168  eEmpty = -1,
169  eInt32 = 3,
170  eReal = 5,
171  eString = 8,
172  eBool = 11,
173  eUInt32 = 19,
174  eVariantArray = 8204
175  };
176 
177  public:
181  Type GetType() const;
182 
186  OdInt32 GetInt32() const;
187 
191  const OdString& GetString() const;
192 
196  bool GetBool() const;
197 
201  double GetDouble() const;
202 
206  const AECVariantArray& GetArray() const;
207 
211  void SetInt32( OdInt32 uValue );
212 
216  void SetString( const OdString& strValue );
217 
221  void SetBool( bool bValue );
222 
226  void SetDouble( double dValue );
227 
231  void SetArray( const AECVariantArray& arr );
232 
236  void SetEmpty();
237 
241  void SetUndefined();
242  protected:
243  typedef enum {
244  kRxVariant = OdVariant::kNextType,
245  kNextType
246  } RxVariantType;
248  void setVarType(int newType, int& type, void* data);
249 };
250 
252 
253 #endif // __AECVARIANT_H__
OdArray< AECVariant > AECVariantArray
Definition: AECVariant.h:30
AECVariant AECBASE_API ConvertDoubleToIntIfInteger(const AECVariant &aVar)
int OdInt32
void setVarType(int newType, int &type, void *data)
bool operator>(const AECVariant &vtValue) const
AECVariant(const AECVariant &vValue)
AECVariant operator&(const AECVariant &vtValue)
OdInt32 GetInt32() const
double GetDouble() const
AECVariant(bool bValue)
AECVariant operator*(const AECVariant &vtValue)
void SetInt32(OdInt32 uValue)
AECVariant(OdInt32 iValue)
AECVariant operator!()
AECVariant operator&&(const AECVariant &vtValue)
bool GetBool() const
bool operator<(const AECVariant &vtValue) const
void SetBool(bool bValue)
bool operator==(const AECVariant &vtValue) const
AECVariant operator+(const AECVariant &vtValue)
AECVariant & operator+=(const AECVariant &vtValue)
const AECVariantArray & GetArray() const
void SetUndefined()
Type GetType() const
const OdString & GetString() const
AECVariant(const OdString &strValue, bool bProcessEscapeSequences=false)
void SetArray(const AECVariantArray &arr)
AECVariant & operator=(const AECVariant &vtValue)
AECVariant(double dValue)
AECVariant operator/(const AECVariant &vtValue)
void SetEmpty()
void SetString(const OdString &strValue)
void SetDouble(double dValue)
bool operator!=(const AECVariant &vtValue) const
AECVariant operator||(const AECVariant &vtValue)
static const OdVariant::TypeFactory * typeFactory(int type)
AECVariant operator-(const AECVariant &vtValue)
GLint GLenum GLsizei GLsizei GLint GLsizei const void * data
Definition: gles2_ext.h:110
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274