NumberVisitor extracts numerical values from a Properties instance, cast to the desired numerical type. More...
#include <NumberVisitor.h>
Public Member Functions | |
NumberVisitor (T value) | |
const T | get () const |
void | operator() (bool v) const |
void | operator() (std::int32_t v) const |
void | operator() (std::uint32_t v) const |
void | operator() (std::int64_t v) const |
void | operator() (std::uint64_t v) const |
void | operator() (double v) const |
template<typename V > | |
void | operator() (V &v) const |
Detailed Description
template<typename T>
class NumberVisitor< T >
NumberVisitor extracts numerical values from a Properties instance, cast to the desired numerical type.
This class is necessary because you don't always know the exact type a numerical value has (e.g., when a Properties instance is loaded from a Lua table).
Definition at line 38 of file NumberVisitor.h.
Constructor & Destructor Documentation
NumberVisitor< T >::NumberVisitor | ( | T | value | ) | [inline] |
Definition at line 43 of file NumberVisitor.h.
Member Function Documentation
const T NumberVisitor< T >::get | ( | ) | const [inline] |
Definition at line 45 of file NumberVisitor.h.
Referenced by get_number().
void NumberVisitor< T >::operator() | ( | bool | v | ) | const [inline] |
Definition at line 49 of file NumberVisitor.h.
void NumberVisitor< T >::operator() | ( | std::int32_t | v | ) | const [inline] |
Definition at line 53 of file NumberVisitor.h.
void NumberVisitor< T >::operator() | ( | std::uint32_t | v | ) | const [inline] |
Definition at line 57 of file NumberVisitor.h.
void NumberVisitor< T >::operator() | ( | std::int64_t | v | ) | const [inline] |
Definition at line 61 of file NumberVisitor.h.
void NumberVisitor< T >::operator() | ( | std::uint64_t | v | ) | const [inline] |
Definition at line 65 of file NumberVisitor.h.
void NumberVisitor< T >::operator() | ( | double | v | ) | const [inline] |
Definition at line 69 of file NumberVisitor.h.
void NumberVisitor< T >::operator() | ( | V & | v | ) | const [inline] |
Definition at line 74 of file NumberVisitor.h.
The documentation for this class was generated from the following file: