zz::cfg::Value Class Reference
The Value class for store/load various type to/from string. More...
#include <zupply.hpp>
Public Member Functions | |
Value () | |
Value default constructor. | |
Value (const char *cstr) | |
Value constructor from raw string. More... | |
Value (std::string str) | |
Value constrctor from string. More... | |
Value (const Value &other) | |
Value copy constructor. More... | |
std::string | str () const |
Return stored string. More... | |
bool | empty () const |
Check if stored string is empty. More... | |
void | clear () |
Clear stored string. | |
bool | operator== (const Value &other) |
Overloaded operator == for comparison. More... | |
Value & | operator= (const Value &other) |
Overloaded operator = for copy. More... | |
template<typename T > | |
std::string | store (T t) |
Store value from template type T Support type that can << to a stringstream. | |
template<typename T > | |
std::string | store (std::vector< T > t) |
Template specification of store for vector of type T Support type that can << to a stringstream. | |
template<typename T > | |
T | load (T &t) |
Load value to template type T Support type that can >> to a stringstream. | |
template<typename T > | |
std::vector< T > | load (std::vector< T > &t) |
template<typename T > | |
T | load () |
Template for load function with no input. | |
template<> | |
bool | load (bool &b) |
Detailed Description
The Value class for store/load various type to/from string.
Constructor & Destructor Documentation
|
inline |
Value constructor from raw string.
- Parameters
-
cstr
|
inline |
Value constrctor from string.
- Parameters
-
str
Member Function Documentation
|
inline |
Check if stored string is empty.
- Returns
- True if empty
Overloaded operator = for copy.
- Parameters
-
other
- Returns
|
inline |
Overloaded operator == for comparison.
- Parameters
-
other
- Returns
- True if stored strings are same
|
inline |
Return stored string.
- Returns
- String
The documentation for this class was generated from the following file: