1#ifndef vtkVariantInlineOperators_h
2#define vtkVariantInlineOperators_h
14 return ((VariantType ==
VTK_LONG_LONG) || (VariantType == VTK_TYPE_INT64));
19#if (CHAR_MIN == SCHAR_MIN && CHAR_MAX == SCHAR_MAX)
47 return (A >= 0) && (A == UnsignedVariant.
ToTypeInt64());
56 return ((A < 0) || (
static_cast<vtkTypeUInt64
>(A) < UnsignedVariant.
ToTypeUInt64()));
65 return ((B > 0) && (UnsignedVariant.
ToTypeUInt64() <
static_cast<vtkTypeUInt64
>(B)));
88 if (!(this->Valid && other.Valid))
90 return (!(this->Valid || other.Valid));
98 (this->Data.VTKObject == other.Data.
VTKObject));
112 return this->CheckUnicodeStringEqual(other);
135 bool thisSigned =
IsSigned(this->Type);
136 bool otherSigned =
IsSigned(other.Type);
138 if (thisSigned ^ otherSigned)
163 if (!(this->Valid && other.Valid))
165 return ((!this->Valid) && (other.Valid));
173 (this->Data.VTKObject < other.Data.
VTKObject));
187 return this->CheckUnicodeStringLessThan(other);
210 bool thisSigned =
IsSigned(this->Type);
211 bool otherSigned =
IsSigned(other.Type);
213 if (thisSigned ^ otherSigned)
249 return (!(this->
operator==(other) || this->
operator<(other)));
254 return (this->
operator==(other) || this->
operator<(other));
259 return (!this->
operator<(other));
A atomic type representing the union of many types.
vtkTypeInt64 ToTypeInt64() const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type.
double ToDouble(bool *valid) const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type.
vtkTypeUInt64 ToTypeUInt64(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.
bool operator>(const vtkVariant &other) const
Compare two variants for equality, greater than, and less than.
double ToDouble() 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 operator!=(const vtkVariant &other) const
Compare two variants for equality, greater than, and less than.
float ToFloat() const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type.
vtkStdString ToString(int formatting=DEFAULT_FORMATTING, int precision=6) const
Convert the variant to a string.
float ToFloat(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.
bool operator<(const vtkVariant &other) const
Compare two variants for equality, greater than, and less than.
vtkTypeInt64 ToTypeInt64(bool *valid) const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type.
vtkObjectBase * VTKObject
#define VTK_UNICODE_STRING
bool CompareSignedUnsignedLessThan(const vtkVariant &SignedVariant, const vtkVariant &UnsignedVariant)
bool CompareSignedUnsignedEqual(const vtkVariant &SignedVariant, const vtkVariant &UnsignedVariant)
bool CompareUnsignedLessThan(const vtkVariant &A, const vtkVariant &B)
bool IsFloatingPoint(int VariantType)
bool CompareSignedLessThan(const vtkVariant &A, const vtkVariant &B)
bool IsSigned(int VariantType)
bool CompareUnsignedSignedLessThan(const vtkVariant &UnsignedVariant, const vtkVariant &SignedVariant)
bool IsSigned64Bit(int VariantType)