CFx SDK Documentation  2020SP3
TfVariant.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 __TF_VARIANT_H__
25 #define __TF_VARIANT_H__
26 
27 #include "RxVariant.h"
28 #include "Tf/TfExport.h"
29 #include "OdGUID.h"
30 
31 class OdDbStub;
32 
33 class OdTfVariant;
36 
42 public:
44  typedef enum {
51  kNextType
52  } Type;
53 
58 
61  static OdTfVariant empty();
62 
63  bool isEmpty() const;
64  bool isVariantArray() const;
65 
67  OdTfVariant(const OdVariant& val);
68  OdTfVariant(const OdTfVariant& val);
69  OdTfVariant(const OdGUID& val);
72  OdTfVariant(OdDbStub* const);
73 
75 
76  virtual ~OdTfVariant();
77  const OdGUID& getGUID() const;
79  OdDbStub* getDbStubPtr() const;
82 
85 
89  OdTfVariant& setDbStubPtr(OdDbStub* const);
91 
92 protected:
93  void setVarType(int newType, int& type, void* data);
94  void makeEmpty();
95 };
96 
98  return lhs == static_cast<OdTfVariant::Type>(rhs);
99 }
100 
102  return !(lhs == rhs);
103 }
104 
106  return rhs == lhs;
107 }
108 
110  return rhs != lhs;
111 }
112 
113 #endif
operator!=
bool operator!=(OdTfVariant::Type lhs, OdVariant::Type rhs)
Definition: TfVariant.h:101
OdTfVariant
Definition: TfVariant.h:41
OdGUID.h
OdTfVariant::makeEmpty
void makeEmpty()
OdTfVariant::kVariantArray
static Type kVariantArray(OdUInt16, OdUInt32)
OdTfVariant::~OdTfVariant
virtual ~OdTfVariant()
OdTfVariant::setRxObjectWeakPtr
OdTfVariant & setRxObjectWeakPtr(OdRxObject *const)
OdTfVariant::getDimsCount
static OdUInt16 getDimsCount(OdTfVariant::Type type)
OdTfVariant::getVariantArray
const OdTfVariantArray & getVariantArray() const
OdTfVariantArray
OdArray< OdTfVariant > OdTfVariantArray
Definition: TfVariant.h:33
OdTfVariant::kTuple
@ kTuple
Definition: TfVariant.h:50
OdTfVariant::kDbStubPtr
@ kDbStubPtr
Definition: TfVariant.h:48
type
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
OdRxObject
Definition: RxObject.h:564
OdTfVariant::empty
static OdTfVariant empty()
OdVariant::TypeFactory
Definition: RxVariant.h:82
OdTfVariant::setVarType
void setVarType(int newType, int &type, void *data)
TFCORE_EXPORT
#define TFCORE_EXPORT
Definition: TfExport.h:34
OdTfVariant::OdTfVariant
OdTfVariant(OdDbStub *const)
OdTfVariant::setGUID
OdTfVariant & setGUID(const OdGUID &)
OdTfVariant::kRxObjectWeakPtr
@ kRxObjectWeakPtr
Definition: TfVariant.h:49
OdArray
Definition: OdArray.h:591
OdTfVariant::getVariantTuple
const OdTfVariantTuple & getVariantTuple() const
OdTfVariant::getGUID
const OdGUID & getGUID() const
OdUInt16
unsigned short OdUInt16
Definition: OdPlatformSettings.h:760
OdTfVariant::OdTfVariant
OdTfVariant(const OdTfVariant &val)
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
data
GLint GLenum GLsizei GLsizei GLint GLsizei const void * data
Definition: gles2_ext.h:110
OdTfVariant::kVariantArray
static Type kVariantArray(OdTfVariant::Type)
OdTfVariant::kEmpty
@ kEmpty
Definition: TfVariant.h:46
OdTfVariant::OdTfVariant
OdTfVariant(const OdVariant &val)
OdVariant::Type
Type
Definition: RxVariant.h:89
OdTfVariant::OdTfVariant
OdTfVariant()
OdTfVariant::asVariantTuple
OdTfVariantTuple & asVariantTuple()
OdTfVariant::setDbStubPtr
OdTfVariant & setDbStubPtr(OdDbStub *const)
OdTfVariant::OdTfVariant
OdTfVariant(const OdTfVariantTuple &)
OdTfVariant::setVariantTuple
OdTfVariant & setVariantTuple(const OdTfVariantTuple &)
OdTfVariant::isVariantArray
bool isVariantArray() const
OdTfVariant::getItemType
static Type getItemType(OdTfVariant::Type type)
OdVariant::kNextType
@ kNextType
Definition: RxVariant.h:105
OdTfVariant::kVariantArray
static Type kVariantArray(OdUInt16, OdTfVariant::Type)
OdVariant
Definition: RxVariant.h:68
OdTfVariant::setVariantArray
OdTfVariant & setVariantArray(OdTfVariant::Type type, const OdTfVariantArray &)
OdTfVariantTuple
OdArray< OdTfVariant > OdTfVariantTuple
Definition: TfVariant.h:35
OdTfVariant::Type
Type
Definition: TfVariant.h:44
OdTfVariant::getDbStubPtr
OdDbStub * getDbStubPtr() const
TfExport.h
OdTfVariant::OdTfVariant
OdTfVariant(OdTfVariant::Type type, const OdTfVariantArray &val)
OdTfVariant::typeFactory
static const OdVariant::TypeFactory * typeFactory(int type)
OdGUID
Definition: OdGUID.h:29
OdTfVariant::OdTfVariant
OdTfVariant(const OdGUID &val)
OdTfVariant::asVariantArray
OdTfVariantArray & asVariantArray()
OdTfVariant::isEmpty
bool isEmpty() const
operator==
bool operator==(OdTfVariant::Type lhs, OdVariant::Type rhs)
Definition: TfVariant.h:97
OdTfVariant::getRxObjectWeakPtr
OdRxObject * getRxObjectWeakPtr() const
OdVariant::operator=
OdVariant & operator=(const OdVariant &val)
OdTfVariant::kDEPRECARED0
@ kDEPRECARED0
Definition: TfVariant.h:47
RxVariant.h
OdTfVariant::kVariantArray
static Type kVariantArray(OdUInt32)