Loading...
Searching...
No Matches
value.h File Reference

Abstract dynamic type representing various numeric types. More...

#include "balance.h"
#include "mask.h"
Include dependency graph for value.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ledger::sort_value_t
class  ledger::value_t::storage_t
class  ledger::value_error
class  ledger::value_t
 Dynamic type representing various numeric types. More...

Namespaces

namespace  ledger

Macros

#define NULL_VALUE   (value_t())
#define SIMPLIFIED_VALUE_OR_ZERO(val)
#define VALUE_OR_ZERO(val)

Functions

template<typename T>
value_tledger::add_or_set_value (value_t &lhs, const T &rhs)
value_t ledger::mask_value (const string &str)
std::ostream & ledger::operator<< (std::ostream &out, const value_t &val)
void ledger::put_value (property_tree::ptree &pt, const value_t &value)
value_t ledger::scope_value (scope_t *val)
bool ledger::sort_value_is_less_than (const std::list< sort_value_t > &left_values, const std::list< sort_value_t > &right_values)
value_t ledger::string_value (const string &str="")
string ledger::value_context (const value_t &val)

Detailed Description

Abstract dynamic type representing various numeric types.

Author
John Wiegley

A value_t object can be one of many types, and changes its type dynamically based on how it is used. For example, if you assign the number 10 to a value object, it's internal type will be INTEGER.

Definition in file value.h.

Macro Definition Documentation

◆ NULL_VALUE

#define NULL_VALUE   (value_t())

◆ SIMPLIFIED_VALUE_OR_ZERO

#define SIMPLIFIED_VALUE_OR_ZERO ( val)
Value:
((val).is_null() ? value_t(0L) : (val).simplified())

Definition at line 973 of file value.h.

◆ VALUE_OR_ZERO

#define VALUE_OR_ZERO ( val)
Value:
((val).is_null() ? value_t(0L) : (val))

Definition at line 972 of file value.h.