CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
TfVariant.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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 Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 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
31class OdDbStub;
32
33class OdTfVariant;
34
40
46
54public:
55
62
67 typedef enum {
68 kGUID = OdVariant::kNextType, // A Global Unique Identifier (GUID) data type.
69 kEmpty, // An empty variant value.
70 kDEPRECARED0, // A deprecated data type (for compatibility only). Do not use it. Note that there can be other deprecated data types in future releases.
71 kDbStubPtr, // A raw pointer to a stub.
72 kRxObjectWeakPtr, // A weak pointer to an OdRxObject.
73 kTuple, // A tuple of variant values of one data type.
74 kNextType // A system data type (for internal use only).
76
83 static Type kVariantArray(OdUInt16 nDims, OdUInt32 itemType);
84
92
98 static Type kVariantArray(OdUInt32 itemType);
99
106
113
120
127
132 bool isEmpty() const;
133
138 bool isVariantArray() const;
139
144
150
156
162
168
175
180 OdTfVariant(OdDbStub* const value);
181
188
192 virtual ~OdTfVariant();
193
198 const OdGUID& getGUID() const;
199
205
210 OdDbStub* getDbStubPtr() const;
211
217
223
231
239
246
254
261
267 OdTfVariant& setDbStubPtr(OdDbStub* const value);
268
275
276//DOM-IGNORE-BEGIN
277protected:
278 void setVarType(int newType, int& type, void* data);
279 void makeEmpty();
280//DOM-IGNORE-END
281};
282
290 return lhs == static_cast<OdTfVariant::Type>(rhs);
291}
292
300 return !(lhs == rhs);
301}
302
310 return rhs == lhs;
311}
312
320 return rhs != lhs;
321}
322
323#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:299
OdArray< OdTfVariant > OdTfVariantArray
Definition: TfVariant.h:39
OdArray< OdTfVariant > OdTfVariantTuple
Definition: TfVariant.h:45
bool operator==(OdTfVariant::Type lhs, OdVariant::Type rhs)
Definition: TfVariant.h:289
Definition: OdGUID.h:33
OdTfVariant & setVariantArray(OdTfVariant::Type type, const OdTfVariantArray &value)
static OdUInt16 getDimsCount(OdTfVariant::Type type)
OdTfVariant(const OdTfVariantTuple &value)
const OdTfVariantTuple & getVariantTuple() const
OdTfVariant(OdDbStub *const value)
OdRxObject * getRxObjectWeakPtr() const
OdTfVariant & setRxObjectWeakPtr(OdRxObject *const value)
OdTfVariant & setVariantTuple(const OdTfVariantTuple &value)
static Type kVariantArray(OdUInt16 nDims, OdUInt32 itemType)
OdTfVariant & setDbStubPtr(OdDbStub *const value)
const OdTfVariantArray & getVariantArray() const
virtual ~OdTfVariant()
void setVarType(int newType, int &type, void *data)
OdTfVariant(const OdGUID &value)
bool isVariantArray() const
OdTfVariant(const OdVariant &value)
static Type kVariantArray(OdUInt16 nDims, OdTfVariant::Type itemType)
bool isEmpty() const
void makeEmpty()
OdTfVariant(OdTfVariant::Type type, const OdTfVariantArray &value)
OdTfVariant(const OdTfVariant &value)
static const OdVariant::TypeFactory * typeFactory(int type)
static Type kVariantArray(OdUInt32 itemType)
static Type getItemType(OdTfVariant::Type type)
static Type kVariantArray(OdTfVariant::Type type)
static OdTfVariant empty()
@ kRxObjectWeakPtr
Definition: TfVariant.h:72
@ kDEPRECARED0
Definition: TfVariant.h:70
OdTfVariant & setGUID(const OdGUID &value)
OdTfVariantArray & asVariantArray()
OdTfVariantTuple & asVariantTuple()
const OdGUID & getGUID() const
OdDbStub * getDbStubPtr() 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
GLsizei const GLfloat * value
Definition: gles2_ext.h:302