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

Definition at line 67 of file expr.h.

◆ check_expr_pair

Definition at line 66 of file expr.h.

◆ const_ptr_op_t

Definition at line 58 of file expr.h.

◆ func_t

Definition at line 75 of file exprbase.h.

◆ ptr_op_t

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

◆ ~merged_expr_t()

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

Definition at line 151 of file expr.h.

References TRACE_DTOR.

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.

◆ calc() [2/2]

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

Definition at line 155 of file exprbase.h.

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

◆ get_context()

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

Definition at line 185 of file exprbase.h.

◆ get_function()

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

◆ get_op()

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

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

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

◆ 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 ledger::expr_t::parse(), and ledger::expr_base_t< value_t >::str.

Referenced by ledger::expr_t::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 >.

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

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

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

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

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

◆ 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 ledger::downcast(), and merge_operator.

+ Here is the call graph for this function:

◆ set_term()

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

Definition at line 155 of file expr.h.

References ledger::downcast(), and term.

+ Here is the call graph for this function:

◆ set_text()

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

Definition at line 118 of file exprbase.h.

◆ text()

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

Definition at line 115 of file exprbase.h.

Member Data Documentation

◆ base_expr

string ledger::merged_expr_t::base_expr

Definition at line 141 of file expr.h.

Referenced by set_base_expr().

◆ compiled

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

Definition at line 80 of file exprbase.h.

◆ context

scope_t* ledger::expr_base_t< value_t >::context
protectedinherited

Definition at line 78 of file exprbase.h.

◆ 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 set_merge_operator().

◆ ptr

ptr_op_t ledger::expr_t::ptr
protectedinherited

Definition at line 70 of file expr.h.

◆ str

string ledger::expr_base_t< value_t >::str
protectedinherited

Definition at line 79 of file exprbase.h.

◆ term

string ledger::merged_expr_t::term

Definition at line 140 of file expr.h.

Referenced by set_term().


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