Nullable
Contents
[
Hide
]Nullable class
Forward declaration.
template<typename T>class Nullable
Template parameters
Parameter | Description |
---|---|
T | The underlying value type which is extended by the Nullable class |
Methods
Method | Description |
---|---|
std::enable_if<IsNullable<T1>::value, bool>::type Equals(const T1&) const | Determines if the value represented by the current object is equal to the value represented by the specified Nullable object. |
bool get_HasValue() const | Determines whether the current object represents any value. |
T get_Value() const | Returns a copy of the value represented by the current object. |
int GetHashCode() const | Returns a hash code for the current object. |
T GetValueOrDefault(T) | Returns the value represented by the current object or the specified value if the value represented by the current object is null. |
T GetValueOrDefault() | |
bool IsNull() const | Determines if the current object represents a null-value. |
Nullable() | Constructs an instance that represents null-value. |
Nullable(std::nullptr_t) | Constructs an instance that represents null. |
Nullable(const T1&) | Constructs an instance of Nullable class that represents the specified value converted (if necessary) to the value of the underlying type T. |
Nullable(const Nullable<T1>&) | Constructs an instance that represents a value that is represented by the specified Nullable object. The specified nullable object may represent a value of different type than the underlying type of the constructed instance in which case the represented value is converted to a value of type T. |
bool NullableBoolHelper(const T1&, const std::function<bool()>&, bool) const | Helper function to check if this and other are both not nulls and call a lambda if so. Used in implementation.s. |
operator const T &() const | Returns a constant reference to the value represented by the current object. |
bool operator!=(std::nullptr_t) const | Determines if the value represented by the current object is not null. |
std::enable_if<!IsNullable<T1>::value, bool>::type operator!=(const T1&) const | Determines if the value represented by the current object is not equal to the specified value. |
bool operator!=(const Nullable<T1>&) const | Determines if the value represented by the current object is not equal to the value represented by the specified Nullable object. |
std::enable_if<std::is_same<T1, bool>::value, Nullable<T>>::type operator&=(bool) | Applies operator&=() to the value represented by the current object using the specified value as a right-side argument. |
Nullable<T> operator+(std::nullptr_t) const | Returns a default constructed instance of Nullable |
auto operator+(const T1&) const | Sums nullable and non-nullable values. |
auto operator+(const Nullable<T1>&) const | Sums nullable values. |
Nullable<T> operator+=(std::nullptr_t) | Resets the current object so that it represents a null-value. |
std::enable_if<!IsNullable<T1>::value, Nullable<T>>::type operator+=(const T1&) | Applies operator+=() to the value represented by the current object using the specified value as a right-side argument. |
Nullable<T> operator+=(const Nullable<T1>&) | Applies operator+=() to the value represented by the current object using the value represented by the specified Nullable object as the right-side argument. |
Nullable<T> operator-(T1) const | Subtracts nullable and null-pointed values. |
auto operator-(const T1&) const | Subtracts nullable and non-nullable values. |
auto operator-(const Nullable<T1>&) const | Subtracts nullable values. |
Nullable<T> operator-=(T1) | Returns an instance of Nullable class that represents a null-value. |
std::enable_if<!IsNullable<T1>::value, Nullable<T>>::type operator-=(const T1&) | Applies operator-=() to the value represented by the current object using the specified value as a right-side argument. |
Nullable<T> operator-=(const Nullable<T1>&) | Applies operator-=() to the value represented by the current object using the value represented by the specified Nullable object as the right-side argument. |
bool operator<(std::nullptr_t) const | Always returns false. |
std::enable_if<!IsNullable<T1>::value, bool>::type operator<(const T1&) const | Determines if the value represented by the current object is less than the specified value by applying operator<() to these values. |
bool operator<(const Nullable<T1>&) const | Determines if the value represented by the current object is less than the value represented by the specified Nullable object by applying operator<() to these values. |
bool operator<=(std::nullptr_t) const | Always returns false. |
std::enable_if<!IsNullable<T1>::value, bool>::type operator<=(const T1&) const | Determines if the value represented by the current object is less or equal to the specified value by applying operator<=() to these values. |
bool operator<=(const Nullable<T1>&) const | Determines if the value represented by the current object is less or equal to the value represented by the specified Nullable object by applying operator<=() to these values. |
Nullable<T> operator=(std::nullptr_t) | Assigns a null to the current object. |
std::enable_if<!IsNullable<T1>::value&&!std::is_null_pointer<T1>::value, Nullable<T>&>::type operator=(const T1&) | Replaces the object’s currently represented value with the specified one. |
Nullable<T>& operator=(const Nullable<T1>&) | Replaces the object’s currently represented value with the specified one. |
bool operator==(std::nullptr_t) const | Determines if the value represented by the current object is null. |
std::enable_if<!IsNullable<T1>::value, bool>::type operator==(const T1&) const | Determines if the value represented by the current object is equal to the specified value. |
bool operator==(const Nullable<T1>&) const | Determines if the value represented by the current object is equal to the value represented by the specified Nullable object. |
bool operator>(std::nullptr_t) const | Always returns false. |
std::enable_if<!IsNullable<T1>::value, bool>::type operator>(const T1&) const | Determines if the value represented by the current object is greater than the specified value by applying operator>() to these values. |
bool operator>(const Nullable<T1>&) const | Determines if the value represented by the current object is greater than the value represented by the specified Nullable object by applying operator>() to these values. |
bool operator>=(std::nullptr_t) const | Always returns false. |
std::enable_if<!IsNullable<T1>::value, bool>::type operator>=(const T1&) const | Determines if the value represented by the current object is greater or equal to the value represented by the specified object by applying operator>=() to these values. |
bool operator>=(const Nullable<T1>&) const | Determines if the value represented by the current object is greater or equal to the value represented by the specified Nullable object by applying operator>=() to these values. |
std::enable_if<std::is_same<T1, bool>::value, Nullable<T>>::type [operator | =](./operator_or_equal/)(bool) |
void reset() | Sets the currently represented value to null. |
String ToString() const | Converts the value represented by the current object to string. |
Typedefs
Typedef | Description |
---|---|
ValueType | An alias for a type of the value represented by this class. |
Remarks
Represents a value of the specified type that can be assigned null. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type.
See Also
- Namespace System
- Library Aspose.Slides