Loading...
Searching...
No Matches
ledger::annotation_t Struct Reference

#include <annotate.h>

+ Inheritance diagram for ledger::annotation_t:
+ Collaboration diagram for ledger::annotation_t:

Public Types

typedefflags_t
 

Public Member Functions

void add_flags (const flags_t arg)
 
 annotation_t (const annotation_t &other)
 
 annotation_t (const optional< amount_t > &_price=none, const optional< date_t > &_date=none, const optional< string > &_tag=none, const optional< expr_t > &_value_expr=none)
 
void clear_flags ()
 
void drop_flags (const flags_t arg)
 
flags_t flags () const
 
bool has_flags (const flags_t arg) const
 
 operator bool () const
 
bool operator< (const annotation_t &rhs) const
 
bool operator== (const annotation_t &rhs) const
 
void parse (std::istream &in)
 
void print (std::ostream &out, bool keep_base=false, bool no_computed_annotations=false) const
 
void set_flags (const flags_t arg)
 
bool valid () const
 
 ~annotation_t ()
 

Public Attributes

optional< date_tdate
 
optional< amount_tprice
 
optional< stringtag
 
optional< expr_tvalue_expr
 

Protected Attributes

flags_t _flags
 

Detailed Description

Definition at line 52 of file annotate.h.

Member Typedef Documentation

◆ flags_t

template<typename T = boost::uint_least8_t, typename U = T>
typedef T ledger::flags::supports_flags< T, U >::flags_t
inherited

Definition at line 50 of file flags.h.

Constructor & Destructor Documentation

◆ annotation_t() [1/2]

ledger::annotation_t::annotation_t ( const optional< amount_t > & _price = none,
const optional< date_t > & _date = none,
const optional< string > & _tag = none,
const optional< expr_t > & _value_expr = none )
inlineexplicit

Definition at line 67 of file annotate.h.

References TRACE_CTOR.

◆ annotation_t() [2/2]

ledger::annotation_t::annotation_t ( const annotation_t & other)
inline

Definition at line 76 of file annotate.h.

References TRACE_CTOR.

◆ ~annotation_t()

ledger::annotation_t::~annotation_t ( )
inline

Definition at line 83 of file annotate.h.

References TRACE_DTOR.

Member Function Documentation

◆ add_flags()

template<typename T = boost::uint_least8_t, typename U = T>
void ledger::flags::supports_flags< T, U >::add_flags ( const flags_t arg)
inlineinherited

Definition at line 87 of file flags.h.

References ledger::flags::supports_flags< T, U >::_flags, and ledger::downcast().

+ Here is the call graph for this function:

◆ clear_flags()

template<typename T = boost::uint_least8_t, typename U = T>
void ledger::flags::supports_flags< T, U >::clear_flags ( )
inlineinherited

Definition at line 84 of file flags.h.

References ledger::flags::supports_flags< T, U >::_flags.

◆ drop_flags()

template<typename T = boost::uint_least8_t, typename U = T>
void ledger::flags::supports_flags< T, U >::drop_flags ( const flags_t arg)
inlineinherited

Definition at line 90 of file flags.h.

References ledger::flags::supports_flags< T, U >::_flags, and ledger::downcast().

+ Here is the call graph for this function:

◆ flags()

template<typename T = boost::uint_least8_t, typename U = T>
flags_t ledger::flags::supports_flags< T, U >::flags ( ) const
inlineinherited

Definition at line 74 of file flags.h.

References ledger::flags::supports_flags< T, U >::_flags.

Referenced by ledger::account_t::has_xflags(), ledger::flags::basic_t< T, U >::operator T(), and ledger::flags::basic_t< T, U >::operator U().

+ Here is the caller graph for this function:

◆ has_flags()

template<typename T = boost::uint_least8_t, typename U = T>
bool ledger::flags::supports_flags< T, U >::has_flags ( const flags_t arg) const
inlineinherited

Definition at line 77 of file flags.h.

References ledger::flags::supports_flags< T, U >::_flags, and ledger::downcast().

+ Here is the call graph for this function:

◆ operator bool()

ledger::annotation_t::operator bool ( ) const
inline

Definition at line 87 of file annotate.h.

References price, tag, and value_expr.

◆ operator<()

bool ledger::annotation_t::operator< ( const annotation_t & rhs) const

◆ operator==()

bool ledger::annotation_t::operator== ( const annotation_t & rhs) const
inline

Definition at line 92 of file annotate.h.

References date, price, tag, and value_expr.

◆ parse()

void ledger::annotation_t::parse ( std::istream & in)

◆ print()

void ledger::annotation_t::print ( std::ostream & out,
bool keep_base = false,
bool no_computed_annotations = false ) const

Referenced by ledger::operator<<().

+ Here is the caller graph for this function:

◆ set_flags()

template<typename T = boost::uint_least8_t, typename U = T>
void ledger::flags::supports_flags< T, U >::set_flags ( const flags_t arg)
inlineinherited

Definition at line 81 of file flags.h.

References ledger::flags::supports_flags< T, U >::_flags, and ledger::downcast().

Referenced by ledger::flags::basic_t< T, U >::basic_t(), ledger::flags::basic_t< T, U >::basic_t(), ledger::flags::basic_t< T, U >::operator=(), and ledger::flags::basic_t< T, U >::operator=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ valid()

bool ledger::annotation_t::valid ( ) const
inline

Definition at line 105 of file annotate.h.

References assert.

Member Data Documentation

◆ _flags

◆ date

optional<date_t> ledger::annotation_t::date

Definition at line 63 of file annotate.h.

Referenced by operator==().

◆ price

optional<amount_t> ledger::annotation_t::price

Definition at line 62 of file annotate.h.

Referenced by operator bool(), and operator==().

◆ tag

optional<string> ledger::annotation_t::tag

Definition at line 64 of file annotate.h.

Referenced by operator bool(), and operator==().

◆ value_expr

optional<expr_t> ledger::annotation_t::value_expr

Definition at line 65 of file annotate.h.

Referenced by operator bool(), operator==(), and ledger::annotated_commodity_t::value_expr().


The documentation for this struct was generated from the following file: