carb::options::Value¶
Defined in carb/extras/Options.h
-
class
carb::options
::
Value
¶ A multi-value type.
This contains a single value of a specific type. The value can only be retrieved if it can be safely converted to the requested type.
Public Functions
-
inline
Value
()¶ Constructor: initializes an object with no specific value in it.
-
inline void
clear
()¶ Clears the value in this object.
- Returns
No return value.
-
inline void
set
(const char *value)¶ Sets the value and type in this object.
- Parameters
value – [in] The value to set in this object. The value’s type is implied from the setter that is used.
- Returns
No return value.
-
inline void
set
(long value)¶ Sets the value and type in this object.
- Parameters
value – [in] The value to set in this object. The value’s type is implied from the setter that is used.
- Returns
No return value.
-
inline void
set
(long long value)¶ Sets the value and type in this object.
- Parameters
value – [in] The value to set in this object. The value’s type is implied from the setter that is used.
- Returns
No return value.
-
inline void
set
(float value)¶ Sets the value and type in this object.
- Parameters
value – [in] The value to set in this object. The value’s type is implied from the setter that is used.
- Returns
No return value.
-
inline void
set
(double value)¶ Sets the value and type in this object.
- Parameters
value – [in] The value to set in this object. The value’s type is implied from the setter that is used.
- Returns
No return value.
-
inline ValueType
getType
() const¶ Retrieves the type of the value in this object.
- Returns
A type name for the value in this object.
-
inline const char *
getString
() const¶ Retrieves the value in this object.
- Returns
The value converted into the requested format if possible.
-
inline long
getLong
() const¶ Retrieves the value in this object.
- Returns
The value converted into the requested format if possible.
-
inline long long
getLongLong
() const¶ Retrieves the value in this object.
- Returns
The value converted into the requested format if possible.
-
inline float
getFloat
() const¶ Retrieves the value in this object.
- Returns
The value converted into the requested format if possible.
-
inline double
getDouble
() const¶ Retrieves the value in this object.
- Returns
The value converted into the requested format if possible.
-
inline