CFx SDK Documentation  2023 SP0
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
unsigned int OdUInt32
unsigned short OdUInt16
#define TFCORE_EXPORT
Definition: TfExport.h:34
bool operator!=(OdTfVariant::Type lhs, OdVariant::Type rhs)
Definition: TfVariant.h:101
OdArray< OdTfVariant > OdTfVariantArray
Definition: TfVariant.h:33
OdArray< OdTfVariant > OdTfVariantTuple
Definition: TfVariant.h:35
bool operator==(OdTfVariant::Type lhs, OdVariant::Type rhs)
Definition: TfVariant.h:97
Definition: OdGUID.h:29
static OdUInt16 getDimsCount(OdTfVariant::Type type)
static Type kVariantArray(OdTfVariant::Type)
OdTfVariantArray & asVariantArray()
OdTfVariant(OdTfVariant::Type type, const OdTfVariantArray &val)
static Type kVariantArray(OdUInt16, OdTfVariant::Type)
virtual ~OdTfVariant()
void setVarType(int newType, int &type, void *data)
bool isVariantArray() const
OdTfVariantTuple & asVariantTuple()
OdDbStub * getDbStubPtr() const
OdTfVariant(const OdTfVariantTuple &)
OdTfVariant & setVariantArray(OdTfVariant::Type type, const OdTfVariantArray &)
const OdTfVariantTuple & getVariantTuple() const
bool isEmpty() const
void makeEmpty()
OdTfVariant(const OdGUID &val)
OdTfVariant & setRxObjectWeakPtr(OdRxObject *const)
OdTfVariant(const OdVariant &val)
static Type kVariantArray(OdUInt16, OdUInt32)
static Type kVariantArray(OdUInt32)
static Type getItemType(OdTfVariant::Type type)
OdTfVariant & setDbStubPtr(OdDbStub *const)
OdTfVariant & setVariantTuple(const OdTfVariantTuple &)
static OdTfVariant empty()
@ kRxObjectWeakPtr
Definition: TfVariant.h:49
@ kDEPRECARED0
Definition: TfVariant.h:47
static const OdVariant::TypeFactory * typeFactory(int type)
const OdGUID & getGUID() const
OdTfVariant(const OdTfVariant &val)
const OdTfVariantArray & getVariantArray() const
OdTfVariant & setGUID(const OdGUID &)
OdTfVariant(OdDbStub *const)
OdRxObject * getRxObjectWeakPtr() const
OdVariant & operator=(const OdVariant &val)
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