40 #include "vtkCommonCoreModule.h"
42 #include "vtkSetGet.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)
185 bool IsValid()
const;
190 bool IsString()
const;
195 bool IsNumeric()
const;
200 bool IsFloat()
const;
205 bool IsDouble()
const;
215 bool IsUnsignedChar()
const;
220 bool IsSignedChar()
const;
225 bool IsShort()
const;
230 bool IsUnsignedShort()
const;
240 bool IsUnsignedInt()
const;
250 bool IsUnsignedLong()
const;
255 bool IsLongLong()
const;
260 bool IsUnsignedLongLong()
const;
265 bool IsVTKObject()
const;
270 bool IsArray()
const;
275 unsigned int GetType()
const;
280 const char* GetTypeAsString()
const;
284 DEFAULT_FORMATTING = 0,
285 FIXED_FORMATTING = 1,
286 SCIENTIFIC_FORMATTING = 2
297 vtkStdString ToString(
int formatting = DEFAULT_FORMATTING,
int precision = 6)
const;
309 float ToFloat(
bool* valid)
const;
311 double ToDouble(
bool* valid)
const;
313 char ToChar(
bool* valid)
const;
315 unsigned char ToUnsignedChar(
bool* valid)
const;
317 signed char ToSignedChar(
bool* valid)
const;
319 short ToShort(
bool* valid)
const;
321 unsigned short ToUnsignedShort(
bool* valid)
const;
323 int ToInt(
bool* valid)
const;
325 unsigned int ToUnsignedInt(
bool* valid)
const;
327 long ToLong(
bool* valid)
const;
329 unsigned long ToUnsignedLong(
bool* valid)
const;
331 long long ToLongLong(
bool* valid)
const;
333 unsigned long long ToUnsignedLongLong(
bool* valid)
const;
335 vtkTypeInt64 ToTypeInt64(
bool* valid)
const;
337 vtkTypeUInt64 ToTypeUInt64(
bool* valid)
const;
397 bool operator>(
const vtkVariant& other)
const;
398 bool operator<=(
const vtkVariant& other)
const;
399 bool operator>=(
const vtkVariant& other)
const;
405 template <
typename T>
406 T ToNumeric(
bool* valid, T* vtkNotUsed(ignored))
const;
unsigned int ToUnsignedInt() const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type...
Wrapper around std::string to keep symbols short.
Abstract superclass for all arrays.
bool VTKCOMMONDATAMODEL_EXPORT operator!=(vtkEdgeBase e1, vtkEdgeBase e2)
unsigned long long ToUnsignedLongLong() const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type...
float ToFloat() const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type...
char ToChar() const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type...
double ToDouble() const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type...
VTKCOMMONCORE_EXPORT ostream & operator<<(ostream &os, const vtkVariant &val)
bool operator<(const vtkPixelExtent &l, const vtkPixelExtent &r)
unsigned char UnsignedChar
A atomic type representing the union of many types.
unsigned char ToUnsignedChar() const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type...
vtkObjectBase * VTKObject
unsigned short UnsignedShort
short ToShort() const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type...
bool VTKCOMMONDATAMODEL_EXPORT operator==(vtkEdgeBase e1, vtkEdgeBase e2)
vtkTypeInt64 ToTypeInt64() const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type...
unsigned long UnsignedLong
abstract base class for most VTK objects
vtkTypeUInt64 ToTypeUInt64() const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type...
int ToInt() const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type...
unsigned long long UnsignedLongLong
unsigned long ToUnsignedLong() const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type...
unsigned short ToUnsignedShort() const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type...
signed char ToSignedChar() const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type...
long long ToLongLong() const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type...
long ToLong() const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type...