|
GnuCash c935c2f+
|
Implements KvpValue using boost::variant. More...
#include <kvp-value.hpp>
Public Types | |
| enum | Type { INVALID = -1 , INT64 = 1 , DOUBLE , NUMERIC , STRING , GUID , TIME64 , PLACEHOLDER_DONT_USE , GLIST , FRAME , GDATE } |
Public Member Functions | |
| KvpValueImpl (KvpValueImpl const &) noexcept | |
| Performs a deep copy. | |
| KvpValueImpl & | operator= (const KvpValueImpl &) noexcept |
| KvpValueImpl (KvpValueImpl &&b) noexcept | |
| Move. | |
| KvpValueImpl & | operator= (KvpValueImpl &&b) noexcept |
| template<typename T > | |
| KvpValueImpl (T) noexcept | |
| Create a KvpValue containing the passed in item. | |
| ~KvpValueImpl () noexcept | |
| Performs a deep delete. | |
| KvpValueImpl * | add (KvpValueImpl *) noexcept |
| Adds another value to this KvpValueImpl. | |
| KvpValueImpl::Type | get_type () const noexcept |
| std::string | to_string () const noexcept |
| std::string | to_string (std::string const &prefix) const noexcept |
| template<typename T > | |
| T | get () const noexcept |
| template<typename T > | |
| const T * | get_ptr () const noexcept |
| template<typename T > | |
| void | set (T) noexcept |
Friends | |
| int | compare (const KvpValueImpl &, const KvpValueImpl &) noexcept |
Implements KvpValue using boost::variant.
Capable of holding the following types:
Definition at line 52 of file kvp-value.hpp.
| enum KvpValueImpl::Type |
Definition at line 55 of file kvp-value.hpp.
|
noexcept |
|
noexcept |
Move.
The old object's datastore is set to int64_t 0.
Definition at line 46 of file kvp-value.cpp.
|
noexcept |
Create a KvpValue containing the passed in item.
Note that for pointer types const char*, KvpFrame*, GncGUID*, and GList* the KvpValue takes ownership of the object and will delete/free it when the KvpValue is destroyed. That means these objects must be allocated in the free store or heap as follows:
Definition at line 150 of file kvp-value.hpp.
|
noexcept |
Performs a deep delete.
The contents of this KvpValueImpl are also deleted.
Definition at line 366 of file kvp-value.cpp.
|
noexcept |
Adds another value to this KvpValueImpl.
If this KvpValueImpl represents a collection (GList), the new value is added to the collection and this is returned.
Otherwise, a new KvpValueImpl representing a collection is created, this and the new value are added to it, and it is returned.
Definition at line 60 of file kvp-value.cpp.
|
noexcept |
Definition at line 156 of file kvp-value.hpp.
|
noexcept |
Definition at line 163 of file kvp-value.hpp.
|
noexcept |
Definition at line 78 of file kvp-value.cpp.
|
noexcept |
Definition at line 40 of file kvp-value.cpp.
|
noexcept |
Definition at line 53 of file kvp-value.cpp.
|
noexcept |
Definition at line 170 of file kvp-value.hpp.
|
noexcept |
Definition at line 201 of file kvp-value.cpp.
|
noexcept |
Definition at line 189 of file kvp-value.cpp.
|
friend |
Definition at line 311 of file kvp-value.cpp.