1 #ifndef vtkVariantInlineOperators_h 2 #define vtkVariantInlineOperators_h 16 (VariantType == VTK_TYPE_INT64));
22 #if (CHAR_MIN == SCHAR_MIN && CHAR_MAX == SCHAR_MAX) 60 return (A >= 0) && (A == UnsignedVariant.
ToTypeInt64());
71 (static_cast<vtkTypeUInt64>(A) < UnsignedVariant.
ToTypeUInt64()));
82 (UnsignedVariant.
ToTypeUInt64() <
static_cast<vtkTypeUInt64
>(B)));
110 if (! (this->Valid && other.Valid))
112 return (!(this->Valid || other.Valid));
121 (this->Data.VTKObject == other.Data.
VTKObject));
161 bool thisSigned =
IsSigned(this->Type);
162 bool otherSigned =
IsSigned(other.Type);
164 if (thisSigned ^ otherSigned)
190 if (! (this->Valid && other.Valid))
192 return ((!this->Valid) && (other.Valid));
201 (this->Data.VTKObject < other.Data.
VTKObject));
240 bool thisSigned =
IsSigned(this->Type);
241 bool otherSigned =
IsSigned(other.Type);
243 if (thisSigned ^ otherSigned)
282 return (!(this->
operator==(other) ||
283 this->
operator<(other)));
289 return (this->
operator==(other) ||
290 this->
operator<(other));
296 return (!this->
operator<(other));
vtkTypeInt64 ToTypeInt64(bool *valid) const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type...
bool operator!=(const vtkVariant &other) const
Compare two variants for equality, greater than, and less than.
vtkUnicodeString ToUnicodeString() const
convert the variant to a Unicode string.
bool IsSigned(int VariantType)
vtkTypeUInt64 ToTypeUInt64(bool *valid) 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...
#define VTK_UNICODE_STRING
double ToDouble() const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type...
A atomic type representing the union of many types.
vtkObjectBase * VTKObject
float ToFloat(bool *valid) const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type...
bool CompareUnsignedSignedLessThan(const vtkVariant &UnsignedVariant, const vtkVariant &SignedVariant)
bool operator>(const vtkVariant &other) const
Compare two variants for equality, greater than, and less than.
bool IsFloatingPoint(int VariantType)
bool CompareSignedUnsignedLessThan(const vtkVariant &SignedVariant, const vtkVariant &UnsignedVariant)
bool CompareUnsignedLessThan(const vtkVariant &A, const vtkVariant &B)
bool operator==(const vtkVariant &other) const
Compare two variants for equality, greater than, and less than.
bool CompareSignedLessThan(const vtkVariant &A, const vtkVariant &B)
vtkTypeInt64 ToTypeInt64() const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type...
bool operator<(const vtkVariant &other) const
Compare two variants for equality, greater than, and less than.
bool CompareSignedUnsignedEqual(const vtkVariant &SignedVariant, const vtkVariant &UnsignedVariant)
bool IsSigned64Bit(int VariantType)
bool operator<=(const vtkVariant &other) const
Compare two variants for equality, greater than, and less than.
bool operator>=(const vtkVariant &other) const
Compare two variants for equality, greater than, and less than.
vtkStdString ToString() const
Convert the variant to a string.
double ToDouble(bool *valid) const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type...