40#include "vtkCommonCoreModule.h"
52#define vtkExtraExtendedTemplateMacro(call) \
53 vtkExtendedTemplateMacro(call); \
54 vtkTemplateMacroCase(VTK_VARIANT, vtkVariant, call)
57#define vtkExtendedArrayIteratorTemplateMacro(call) \
58 vtkArrayIteratorTemplateMacro(call); \
59 vtkArrayIteratorTemplateMacroCase(VTK_VARIANT, vtkVariant, call);
331 return this->ToFloat(0); };
334 return this->ToDouble(0); };
337 return this->ToChar(0); };
340 return this->ToUnsignedChar(0); };
343 return this->ToSignedChar(0); };
346 return this->ToShort(0); };
349 return this->ToUnsignedShort(0); };
352 return this->ToInt(0); };
355 return this->ToUnsignedInt(0); };
358 return this->ToLong(0); };
361 return this->ToUnsignedLong(0); };
364 return this->ToLongLong(0); };
367 return this->ToUnsignedLongLong(0); };
370 return this->ToTypeInt64(0); };
373 return this->ToTypeUInt64(0); };
441 template <
typename T>
442 T ToNumeric(
bool *valid, T* vtkNotUsed(ignored))
const;
Abstract superclass for all arrays.
abstract base class for most VTK objects
Wrapper around std::string to keep symbols short.
String class that stores Unicode text.
A atomic type representing the union of many types.
bool Is__Int64() const
Legacy.
vtkTypeInt64 ToTypeInt64() const
vtkVariant(float value)
Create a float variant.
bool IsArray() const
Get whether the variant is a VTK array (i.e.
long long ToLongLong(bool *valid) const
~vtkVariant()
Destruct the variant.
unsigned long long UnsignedLongLong
double ToDouble(bool *valid) const
long long ToLongLong() const
vtkTypeUInt64 ToTypeUInt64(bool *valid) const
unsigned short ToUnsignedShort(bool *valid) const
vtkUnicodeString ToUnicodeString() const
convert the variant to a Unicode string.
vtkVariant(unsigned long value)
Create an unsigned long variant.
bool IsUnsignedChar() const
Get whether the variant is an unsigned char.
unsigned int GetType() const
Get the type of the variant.
unsigned char ToUnsignedChar(bool *valid) const
unsigned char ToUnsignedChar() const
vtkVariant(unsigned int value)
Create an unsigned integer variant.
vtkVariant(char value)
Create a char variant.
unsigned short UnsignedShort
char ToChar(bool *valid) const
vtkUnicodeString * UnicodeString
bool IsUnsignedLong() const
Get whether the variant is an unsigned long.
vtkVariant(int value)
Create an integer variant.
bool IsDouble() const
Get whether the variant is a double.
bool IsUnicodeString() const
Get whether the variant is a Unicode string.
vtkVariant(vtkStdString value)
Create a string variant from a std string.
vtkVariant(unsigned long long value)
Create an unsigned long long variant.
const char * GetTypeAsString() const
Get the type of the variant as a string.
signed char ToSignedChar() const
bool IsInt() const
Get whether the variant is an int.
vtkObjectBase * ToVTKObject() const
Return the VTK object, or NULL if not of that type.
bool IsUnsignedInt() const
Get whether the variant is an unsigned int.
unsigned long ToUnsignedLong(bool *valid) const
bool IsFloat() const
Get whether the variant is a float.
bool IsUnsignedShort() const
Get whether the variant is an unsigned short.
vtkVariant(long value)
Create an long variant.
vtkVariant(signed char value)
Create a signed char variant.
vtkVariant(vtkObjectBase *value)
Create a vtkObjectBase variant.
vtkVariant(const vtkUnicodeString &value)
Create a Unicode string variant.
bool IsChar() const
Get whether the variant is an char.
bool IsVTKObject() const
Get whether the variant is a VTK object pointer.
vtkVariant(long long value)
Create a long long variant.
bool IsLongLong() const
Get whether the variant is long long.
signed char ToSignedChar(bool *valid) const
unsigned int ToUnsignedInt() const
float ToFloat(bool *valid) const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type.
bool IsValid() const
Get whether the variant value is valid.
int ToInt(bool *valid) const
vtkVariant(bool value)
Create a bool variant.
vtkAbstractArray * ToArray() const
Return the array, or NULL if not of that type.
unsigned long long ToUnsignedLongLong() const
long ToLong(bool *valid) const
bool IsSignedChar() const
Get whether the variant is an signed char.
vtkTypeInt64 ToTypeInt64(bool *valid) const
bool IsString() const
Get whether the variant is a string.
unsigned int ToUnsignedInt(bool *valid) const
vtkVariant(const vtkVariant &other)
Copy constructor.
vtkVariant(const vtkVariant &other, unsigned int type)
Create a variant of a specific type.
unsigned long ToUnsignedLong() const
vtkVariant(unsigned char value)
Create an unsigned char variant.
vtkStdString ToString() const
Convert the variant to a string.
unsigned long UnsignedLong
unsigned char UnsignedChar
vtkVariant(short value)
Create a short variant.
vtkVariant(unsigned short value)
Create an unsigned short variant.
vtkVariant()
Create an invalid variant.
bool IsLong() const
Get whether the variant is an long.
vtkVariant(double value)
Create a double variant.
unsigned short ToUnsignedShort() const
bool IsEqual(const vtkVariant &other) const
Determines whether two variants have the same value.
vtkObjectBase * VTKObject
bool IsNumeric() const
Get whether the variant is any numeric type.
bool IsShort() const
Get whether the variant is an short.
bool IsUnsigned__Int64() const
Legacy.
vtkTypeUInt64 ToTypeUInt64() const
short ToShort(bool *valid) const
vtkVariant(const char *value)
Create a string variant from a const char*.
unsigned long long ToUnsignedLongLong(bool *valid) const
bool IsUnsignedLongLong() const
Get whether the variant is unsigned long long.
bool operator()(const vtkVariant &s1, const vtkVariant &s2) const
bool operator()(const vtkVariant &s1, const vtkVariant &s2) const
bool operator()(const vtkVariant &s1, const vtkVariant &s2) const
bool operator()(const vtkVariant &s1, const vtkVariant &s2) const
VTKCOMMONCORE_EXPORT bool operator!=(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
VTKCOMMONCORE_EXPORT bool operator==(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
VTKCOMMONCORE_EXPORT bool operator>(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
VTKCOMMONCORE_EXPORT bool operator<(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
VTKCOMMONCORE_EXPORT bool operator>=(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
VTKCOMMONCORE_EXPORT bool operator<=(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
VTKCOMMONCORE_EXPORT ostream & operator<<(ostream &os, const vtkVariant &val)