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

#include <predicate.h>

+ Inheritance diagram for ledger::predicate_t:
+ Collaboration diagram for ledger::predicate_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

result_type calc ()
 
result_type calc (scope_t &scope)
 
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 ()
 
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)
 
 predicate_t (const keep_details_t &_what_to_keep=keep_details_t())
 
 predicate_t (const predicate_t &other)
 
 predicate_t (const string &str, const keep_details_t &_what_to_keep, const parse_flags_t &flags=PARSE_DEFAULT)
 
 predicate_t (ptr_op_t _ptr, const keep_details_t &_what_to_keep, scope_t *_context=NULL)
 
 predicate_t (std::istream &in, const keep_details_t &_what_to_keep, const parse_flags_t &flags=PARSE_DEFAULT)
 
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 set_context (scope_t *scope)
 
void set_text (const string &txt)
 
virtual string text () const throw ()
 
virtual ~predicate_t ()
 

Public Attributes

keep_details_t what_to_keep
 

Protected Attributes

bool compiled
 
scope_tcontext
 
ptr_op_t ptr
 
string str
 

Detailed Description

Definition at line 50 of file predicate.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

◆ predicate_t() [1/5]

ledger::predicate_t::predicate_t ( const keep_details_t & _what_to_keep = keep_details_t())
inline

Definition at line 55 of file predicate.h.

References TRACE_CTOR.

◆ predicate_t() [2/5]

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

Definition at line 59 of file predicate.h.

References TRACE_CTOR.

◆ predicate_t() [3/5]

ledger::predicate_t::predicate_t ( ptr_op_t _ptr,
const keep_details_t & _what_to_keep,
scope_t * _context = NULL )
inline

Definition at line 63 of file predicate.h.

References TRACE_CTOR.

◆ predicate_t() [4/5]

ledger::predicate_t::predicate_t ( const string & str,
const keep_details_t & _what_to_keep,
const parse_flags_t & flags = PARSE_DEFAULT )
inline

Definition at line 69 of file predicate.h.

References TRACE_CTOR.

◆ predicate_t() [5/5]

ledger::predicate_t::predicate_t ( std::istream & in,
const keep_details_t & _what_to_keep,
const parse_flags_t & flags = PARSE_DEFAULT )
inline

Definition at line 75 of file predicate.h.

References TRACE_CTOR.

◆ ~predicate_t()

virtual ledger::predicate_t::~predicate_t ( )
inlinevirtual

Definition at line 81 of file predicate.h.

References TRACE_DTOR.

Member Function Documentation

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

◆ compile()

virtual void ledger::expr_t::compile ( scope_t & scope)
virtualinherited

Reimplemented from ledger::expr_base_t< value_t >.

Reimplemented in ledger::merged_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 >.

◆ 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::predicate_t::real_calc ( scope_t & scope)
inlinevirtual

Reimplemented from ledger::expr_t.

Definition at line 85 of file predicate.h.

References ledger::expr_t::real_calc(), and what_to_keep.

+ Here is the call 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.

◆ set_context()

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

Definition at line 188 of file exprbase.h.

◆ 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

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

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

◆ what_to_keep

keep_details_t ledger::predicate_t::what_to_keep

Definition at line 53 of file predicate.h.

Referenced by real_calc().


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