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

#include <expr.h>

Inheritance diagram for ledger::merged_expr_t:
Collaboration diagram for ledger::merged_expr_t:

Public Types

enum  check_expr_kind_t { EXPR_GENERAL , EXPR_ASSERTION , EXPR_CHECK }
typedef std::list< check_expr_paircheck_expr_list
typedef std::pair< expr_t, check_expr_kind_tcheck_expr_pair
typedef intrusive_ptr< const op_tconst_ptr_op_t
typedef function< result_type(call_scope_t &)> func_t
typedef intrusive_ptr< op_tptr_op_t
typedef value_t result_type

Public Member Functions

void append (const string &expr)
result_type calc ()
result_type calc (scope_t &scope)
bool check_for_single_identifier (const string &expr)
virtual void compile (scope_t &scope)
value_tconstant_value ()
const value_tconstant_value () const
virtual string context_to_str () const
virtual void dump (std::ostream &out) const
string dump_to_str () const
scope_tget_context ()
func_tget_function ()
ptr_op_t get_op () throw ()
bool is_constant () const
bool is_function () const
virtual void mark_uncompiled ()
 merged_expr_t (const string &_term, const string &expr, const string &merge_op=";")
virtual operator bool () const throw ()
result_type operator() (scope_t &scope)
void parse (const string &str, const parse_flags_t &flags=PARSE_DEFAULT)
virtual void parse (std::istream &in, const parse_flags_t &flags=PARSE_DEFAULT, const optional< string > &original_string=none)
void prepend (const string &expr)
result_type preview (std::ostream &out, scope_t &scope) const
string preview_to_str (scope_t &) const
virtual void print (std::ostream &out) const
string print_to_str () const
virtual value_t real_calc (scope_t &scope)
void recompile (scope_t &scope)
void remove (const string &expr)
void set_base_expr (const string &expr)
void set_context (scope_t *scope)
void set_merge_operator (const string &merge_op)
void set_term (const string &_term)
void set_text (const string &txt)
virtual string text () const throw ()
virtual ~merged_expr_t ()

Public Attributes

string base_expr
std::list< stringexprs
string merge_operator
string term

Protected Attributes

bool compiled
scope_tcontext
ptr_op_t ptr
string str

Detailed Description

Definition at line 137 of file expr.h.

Member Typedef Documentation

◆ check_expr_list

typedef std::list<check_expr_pair> ledger::expr_t::check_expr_list
inherited

Definition at line 67 of file expr.h.

◆ check_expr_pair

Definition at line 66 of file expr.h.

◆ const_ptr_op_t

typedef intrusive_ptr<const op_t> ledger::expr_t::const_ptr_op_t
inherited

Definition at line 58 of file expr.h.

◆ 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.

◆ ptr_op_t

typedef intrusive_ptr<op_t> ledger::expr_t::ptr_op_t
inherited

Definition at line 57 of file expr.h.

◆ result_type

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

Definition at line 73 of file exprbase.h.

Member Enumeration Documentation

◆ check_expr_kind_t

Enumerator
EXPR_GENERAL 
EXPR_ASSERTION 
EXPR_CHECK 

Definition at line 60 of file expr.h.

Constructor & Destructor Documentation

◆ merged_expr_t()

ledger::merged_expr_t::merged_expr_t ( const string & _term,
const string & expr,
const string & merge_op = ";" )
inline

Definition at line 146 of file expr.h.

References base_expr, ledger::expr_t::expr_t(), merge_operator, merged_expr_t(), term, and TRACE_CTOR.

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

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

◆ ~merged_expr_t()

virtual ledger::merged_expr_t::~merged_expr_t ( )
inlinevirtual

Definition at line 151 of file expr.h.

References merged_expr_t(), and TRACE_DTOR.

Here is the call graph for this function:

Member Function Documentation

◆ append()

void ledger::merged_expr_t::append ( const string & expr)
inline

Definition at line 171 of file expr.h.

References check_for_single_identifier(), and exprs.

Here is the call graph for this function:

◆ 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:

◆ check_for_single_identifier()

bool ledger::merged_expr_t::check_for_single_identifier ( const string & expr)

Referenced by append(), and prepend().

Here is the caller graph for this function:

◆ compile()

virtual void ledger::merged_expr_t::compile ( scope_t & scope)
virtual

Reimplemented from ledger::expr_t.

◆ constant_value() [1/2]

value_t & ledger::expr_t::constant_value ( )
inherited

◆ constant_value() [2/2]

const value_t & ledger::expr_t::constant_value ( ) const
inherited

◆ context_to_str()

virtual string ledger::expr_t::context_to_str ( ) const
virtualinherited

Reimplemented from ledger::expr_base_t< value_t >.

◆ dump()

virtual void ledger::expr_t::dump ( std::ostream & out) const
virtualinherited

Reimplemented from ledger::expr_base_t< value_t >.

◆ 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.

◆ get_function()

func_t & ledger::expr_t::get_function ( )
inherited

◆ get_op()

ptr_op_t ledger::expr_t::get_op ( )
throw ( )
inherited

References get_op().

Referenced by get_op().

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

◆ is_constant()

bool ledger::expr_t::is_constant ( ) const
inherited

◆ is_function()

bool ledger::expr_t::is_function ( ) const
inherited

◆ 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_t::operator bool ( ) const
throw ( )
virtualinherited

Reimplemented from ledger::expr_base_t< value_t >.

◆ 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_t::parse ( const string & str,
const parse_flags_t & flags = PARSE_DEFAULT )
inlineinherited

Definition at line 88 of file expr.h.

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

Referenced by parse().

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

◆ parse() [2/2]

virtual void ledger::expr_t::parse ( std::istream & in,
const parse_flags_t & flags = PARSE_DEFAULT,
const optional< string > & original_string = none )
virtualinherited

Reimplemented from ledger::expr_base_t< value_t >.

References ledger::PARSE_DEFAULT.

◆ prepend()

void ledger::merged_expr_t::prepend ( const string & expr)
inline

Definition at line 167 of file expr.h.

References check_for_single_identifier(), and exprs.

Here is the call 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_t::print ( std::ostream & out) const
virtualinherited

Reimplemented from ledger::expr_base_t< value_t >.

◆ 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 value_t ledger::expr_t::real_calc ( scope_t & scope)
virtualinherited

Implements ledger::expr_base_t< value_t >.

Reimplemented in ledger::predicate_t.

Referenced by ledger::predicate_t::real_calc().

Here is the caller graph for this function:

◆ 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:

◆ remove()

void ledger::merged_expr_t::remove ( const string & expr)
inline

Definition at line 175 of file expr.h.

References exprs.

◆ set_base_expr()

void ledger::merged_expr_t::set_base_expr ( const string & expr)
inline

Definition at line 158 of file expr.h.

References base_expr.

◆ 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_merge_operator()

void ledger::merged_expr_t::set_merge_operator ( const string & merge_op)
inline

Definition at line 161 of file expr.h.

References merge_operator.

◆ set_term()

void ledger::merged_expr_t::set_term ( const string & _term)
inline

Definition at line 155 of file expr.h.

References term.

◆ 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

◆ base_expr

string ledger::merged_expr_t::base_expr

Definition at line 141 of file expr.h.

Referenced by merged_expr_t(), and set_base_expr().

◆ compiled

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

◆ context

◆ exprs

std::list<string> ledger::merged_expr_t::exprs

Definition at line 144 of file expr.h.

Referenced by append(), prepend(), and remove().

◆ merge_operator

string ledger::merged_expr_t::merge_operator

Definition at line 142 of file expr.h.

Referenced by merged_expr_t(), and set_merge_operator().

◆ ptr

ptr_op_t ledger::expr_t::ptr
protectedinherited

Definition at line 70 of file expr.h.

◆ str

◆ term

string ledger::merged_expr_t::term

Definition at line 140 of file expr.h.

Referenced by merged_expr_t(), and set_term().


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