Loading...
Searching...
No Matches
ledger::draft_t Class Reference

#include <draft.h>

Inheritance diagram for ledger::draft_t:
Collaboration diagram for ledger::draft_t:

Public Types

typedef function< result_type(call_scope_t &)> func_t
typedef value_t result_type

Public Member Functions

result_type calc ()
result_type calc (scope_t &scope)
virtual void compile (scope_t &scope)
virtual string context_to_str () const
 draft_t (const value_t &args)
virtual void dump (std::ostream &out) const
string dump_to_str () const
scope_tget_context ()
xact_tinsert (journal_t &journal)
virtual void mark_uncompiled ()
virtual operator bool () const throw ()
result_type operator() (scope_t &scope)
void parse (const string &expr_str, const parse_flags_t &flags=PARSE_DEFAULT)
virtual void parse (std::istream &, const parse_flags_t &=PARSE_DEFAULT, const optional< string > &original_string=none)
void parse_args (const value_t &args)
result_type preview (std::ostream &out, scope_t &scope) const
string preview_to_str (scope_t &) const
virtual void print (std::ostream &) const
string print_to_str () const
virtual result_type real_calc (scope_t &)
void recompile (scope_t &scope)
void set_context (scope_t *scope)
void set_text (const string &txt)
virtual string text () const throw ()
virtual ~draft_t () throw ()

Protected Attributes

bool compiled
scope_tcontext
string str

Detailed Description

Definition at line 52 of file draft.h.

Member Typedef Documentation

◆ func_t

typedef function<result_type (call_scope_t&)> ledger::expr_base_t< value_t >::func_t
inherited

Definition at line 75 of file exprbase.h.

◆ result_type

typedef value_t ledger::expr_base_t< value_t >::result_type
inherited

Definition at line 73 of file exprbase.h.

Constructor & Destructor Documentation

◆ draft_t()

ledger::draft_t::draft_t ( const value_t & args)
inline

Definition at line 104 of file draft.h.

References draft_t(), ledger::value_t::empty(), parse_args(), and TRACE_CTOR.

Referenced by draft_t(), and ~draft_t().

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

◆ ~draft_t()

virtual ledger::draft_t::~draft_t ( )
throw ( )
inlinevirtual

Definition at line 109 of file draft.h.

References draft_t(), and TRACE_DTOR.

Here is the call graph for this function:

Member Function Documentation

◆ calc() [1/2]

result_type ledger::expr_base_t< value_t >::calc ( )
inlineinherited

Definition at line 180 of file exprbase.h.

References assert, ledger::expr_base_t< ResultType >::calc(), and context.

Here is the call graph for this function:

◆ calc() [2/2]

result_type ledger::expr_base_t< value_t >::calc ( scope_t & scope)
inlineinherited

Definition at line 155 of file exprbase.h.

References ledger::_log_stream, ledger::expr_base_t< ResultType >::compile(), compiled, DEBUG, ledger::expr_base_t< ResultType >::dump(), ledger::expr_base_t< ResultType >::real_calc(), SHOW_DEBUG, and str.

Here is the call graph for this function:

◆ compile()

virtual void ledger::expr_base_t< value_t >::compile ( scope_t & scope)
inlinevirtualinherited

Reimplemented in ledger::expr_t, and ledger::merged_expr_t.

Definition at line 143 of file exprbase.h.

References compiled, and context.

◆ context_to_str()

virtual string ledger::expr_base_t< value_t >::context_to_str ( ) const
inlinevirtualinherited

Reimplemented in ledger::expr_t.

Definition at line 192 of file exprbase.h.

References ledger::empty_string.

◆ dump()

virtual void ledger::draft_t::dump ( std::ostream & out) const
inlinevirtual

Reimplemented from ledger::expr_base_t< value_t >.

Definition at line 122 of file draft.h.

◆ dump_to_str()

string ledger::expr_base_t< value_t >::dump_to_str ( ) const
inlineinherited

Definition at line 201 of file exprbase.h.

References ledger::expr_base_t< ResultType >::dump().

Here is the call graph for this function:

◆ get_context()

scope_t * ledger::expr_base_t< value_t >::get_context ( )
inlineinherited

Definition at line 185 of file exprbase.h.

References context.

◆ insert()

xact_t * ledger::draft_t::insert ( journal_t & journal)

◆ mark_uncompiled()

virtual void ledger::expr_base_t< value_t >::mark_uncompiled ( )
inlinevirtualinherited

Definition at line 134 of file exprbase.h.

References compiled.

◆ operator bool()

virtual ledger::expr_base_t< value_t >::operator bool ( ) const
throw ( )
inlinevirtualinherited

Reimplemented in ledger::expr_t.

Definition at line 111 of file exprbase.h.

References str.

◆ operator()()

result_type ledger::expr_base_t< value_t >::operator() ( scope_t & scope)
inlineinherited

Definition at line 151 of file exprbase.h.

References ledger::expr_base_t< ResultType >::calc().

Here is the call graph for this function:

◆ parse() [1/2]

void ledger::expr_base_t< value_t >::parse ( const string & expr_str,
const parse_flags_t & flags = PARSE_DEFAULT )
inlineinherited

Definition at line 123 of file exprbase.h.

References ledger::expr_base_t< ResultType >::parse(), and ledger::PARSE_DEFAULT.

Here is the call graph for this function:

◆ parse() [2/2]

virtual void ledger::expr_base_t< value_t >::parse ( std::istream & ,
const parse_flags_t & = PARSE_DEFAULT,
const optional< string > & original_string = none )
inlinevirtualinherited

Reimplemented in ledger::expr_t.

Definition at line 128 of file exprbase.h.

References ledger::PARSE_DEFAULT, and ledger::expr_base_t< ResultType >::set_text().

Here is the call graph for this function:

◆ parse_args()

void ledger::draft_t::parse_args ( const value_t & args)

Referenced by draft_t().

Here is the caller graph for this function:

◆ preview()

result_type ledger::expr_base_t< value_t >::preview ( std::ostream & out,
scope_t & scope ) const
inlineinherited

Definition at line 215 of file exprbase.h.

References ledger::expr_base_t< ResultType >::calc(), ledger::expr_base_t< ResultType >::compile(), ledger::expr_base_t< ResultType >::dump(), ledger::expr_base_t< ResultType >::print(), and ledger::expr_base_t< ResultType >::text().

Here is the call graph for this function:

◆ preview_to_str()

string ledger::expr_base_t< value_t >::preview_to_str ( scope_t & ) const
inlineinherited

Definition at line 206 of file exprbase.h.

References ledger::expr_base_t< ResultType >::preview().

Here is the call graph for this function:

◆ print()

virtual void ledger::expr_base_t< value_t >::print ( std::ostream & ) const
inlinevirtualinherited

Reimplemented in ledger::expr_t.

Definition at line 212 of file exprbase.h.

◆ print_to_str()

string ledger::expr_base_t< value_t >::print_to_str ( ) const
inlineinherited

Definition at line 196 of file exprbase.h.

References ledger::expr_base_t< ResultType >::print().

Here is the call graph for this function:

◆ real_calc()

virtual result_type ledger::draft_t::real_calc ( scope_t & )
inlinevirtual

Implements ledger::expr_base_t< value_t >.

Definition at line 115 of file draft.h.

References assert.

◆ recompile()

void ledger::expr_base_t< value_t >::recompile ( scope_t & scope)
inlineinherited

Definition at line 138 of file exprbase.h.

References ledger::expr_base_t< ResultType >::compile(), and compiled.

Here is the call graph for this function:

◆ set_context()

void ledger::expr_base_t< value_t >::set_context ( scope_t * scope)
inlineinherited

Definition at line 188 of file exprbase.h.

References context.

◆ set_text()

void ledger::expr_base_t< value_t >::set_text ( const string & txt)
inlineinherited

Definition at line 118 of file exprbase.h.

References compiled, and str.

◆ text()

virtual string ledger::expr_base_t< value_t >::text ( ) const
throw ( )
inlinevirtualinherited

Definition at line 115 of file exprbase.h.

References str.

Member Data Documentation

◆ compiled

bool ledger::expr_base_t< value_t >::compiled
protectedinherited

◆ context

◆ str


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