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

#include <scope.h>

+ Inheritance diagram for ledger::call_scope_t:
+ Collaboration diagram for ledger::call_scope_t:

Public Types

typedef value_t::sequence_t::const_iterator const_iterator
 
typedef value_t::sequence_t::iterator iterator
 

Public Member Functions

value_t::sequence_t::iterator begin ()
 
value_t::sequence_t::const_iterator begin () const
 
 call_scope_t (scope_t &_parent, expr_t::ptr_op_t *_locus=NULL, const int _depth=0)
 
template<typename T >
T & context ()
 
virtual void define (const symbol_t::kind_t kind, const string &name, expr_t::ptr_op_t def)
 
virtual string description ()
 
bool empty () const
 
value_t::sequence_t::iterator end ()
 
value_t::sequence_t::const_iterator end () const
 
template<>
bool get (std::size_t index, bool convert)
 
template<>
long get (std::size_t index, bool convert)
 
template<>
amount_t get (std::size_t index, bool convert)
 
template<>
balance_t get (std::size_t index, bool convert)
 
template<>
string get (std::size_t index, bool convert)
 
template<>
mask_t get (std::size_t index, bool convert)
 
template<>
date_t get (std::size_t index, bool convert)
 
template<>
datetime_t get (std::size_t index, bool convert)
 
template<typename T >
get (std::size_t index, bool convert=true)
 
template<>
int get (std::size_t index, bool)
 
template<>
scope_tget (std::size_t index, bool)
 
bool has (std::size_t index)
 
template<typename T >
bool has (std::size_t index)
 
template<>
bool has (std::size_t index)
 
template<>
bool has (std::size_t index)
 
template<>
bool has (std::size_t index)
 
template<>
bool has (std::size_t index)
 
template<>
bool has (std::size_t index)
 
template<>
bool has (std::size_t index)
 
template<>
bool has (std::size_t index)
 
template<>
bool has (std::size_t index)
 
template<>
bool has (std::size_t index)
 
virtual expr_t::ptr_op_t lookup (const symbol_t::kind_t kind, const string &name)
 
value_toperator[] (const std::size_t index)
 
void pop_back ()
 
void push_back (const value_t &val)
 
void push_front (const value_t &val)
 
value_tresolve (const std::size_t index, value_t::type_t context=value_t::VOID, const bool required=false)
 
void set_args (const value_t &_args)
 
std::size_t size () const
 
virtual value_t::type_t type_context () const
 
virtual bool type_required () const
 
value_tvalue ()
 
virtual ~call_scope_t ()
 

Public Attributes

value_t args
 
const int depth
 
expr_t::ptr_op_tlocus
 
scope_tparent
 
voidptr
 

Static Public Attributes

static scope_tdefault_scope
 
static empty_scope_tempty_scope
 

Detailed Description

Definition at line 306 of file scope.h.

Member Typedef Documentation

◆ const_iterator

typedef value_t::sequence_t::const_iterator ledger::call_scope_t::const_iterator

Definition at line 386 of file scope.h.

◆ iterator

typedef value_t::sequence_t::iterator ledger::call_scope_t::iterator

Definition at line 377 of file scope.h.

Constructor & Destructor Documentation

◆ call_scope_t()

ledger::call_scope_t::call_scope_t ( scope_t & _parent,
expr_t::ptr_op_t * _locus = NULL,
const int _depth = 0 )
inlineexplicit

Definition at line 320 of file scope.h.

References TRACE_CTOR.

◆ ~call_scope_t()

virtual ledger::call_scope_t::~call_scope_t ( )
inlinevirtual

Definition at line 328 of file scope.h.

References TRACE_DTOR.

Member Function Documentation

◆ begin() [1/2]

value_t::sequence_t::iterator ledger::call_scope_t::begin ( )
inline

Definition at line 379 of file scope.h.

References args, and ledger::value_t::begin().

+ Here is the call graph for this function:

◆ begin() [2/2]

value_t::sequence_t::const_iterator ledger::call_scope_t::begin ( ) const
inline

Definition at line 388 of file scope.h.

References args, and ledger::value_t::begin().

+ Here is the call graph for this function:

◆ context()

template<typename T >
T & ledger::call_scope_t::context ( )
inline

Definition at line 360 of file scope.h.

References assert, ledger::downcast(), and ptr.

+ Here is the call graph for this function:

◆ define()

virtual void ledger::child_scope_t::define ( const symbol_t::kind_t kind,
const string & name,
expr_t::ptr_op_t def )
inlinevirtualinherited

Reimplemented from ledger::scope_t.

Reimplemented in ledger::bind_scope_t, and ledger::symbol_scope_t.

Definition at line 150 of file scope.h.

References ledger::scope_t::define(), ledger::downcast(), and ledger::child_scope_t::parent.

+ Here is the call graph for this function:

◆ description()

virtual string ledger::context_scope_t::description ( )
inlinevirtualinherited

Implements ledger::scope_t.

Definition at line 294 of file scope.h.

References ledger::scope_t::description(), and ledger::child_scope_t::parent.

+ Here is the call graph for this function:

◆ empty()

bool ledger::call_scope_t::empty ( ) const
inline

Definition at line 398 of file scope.h.

References args, and ledger::value_t::size().

Referenced by ledger::option_t< T >::operator()().

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

◆ end() [1/2]

value_t::sequence_t::iterator ledger::call_scope_t::end ( )
inline

Definition at line 382 of file scope.h.

References args, and ledger::value_t::end().

+ Here is the call graph for this function:

◆ end() [2/2]

value_t::sequence_t::const_iterator ledger::call_scope_t::end ( ) const
inline

Definition at line 391 of file scope.h.

References args, and ledger::value_t::end().

+ Here is the call graph for this function:

◆ get() [1/11]

template<>
bool ledger::call_scope_t::get ( std::size_t index,
bool convert )
inline

Definition at line 485 of file scope.h.

References ledger::value_t::as_boolean(), ledger::value_t::BOOLEAN, resolve(), and ledger::value_t::to_boolean().

+ Here is the call graph for this function:

◆ get() [2/11]

template<>
long ledger::call_scope_t::get ( std::size_t index,
bool convert )
inline

Definition at line 496 of file scope.h.

References ledger::value_t::as_long(), ledger::value_t::INTEGER, resolve(), and ledger::value_t::to_long().

+ Here is the call graph for this function:

◆ get() [3/11]

template<>
amount_t ledger::call_scope_t::get ( std::size_t index,
bool convert )
inline

Definition at line 503 of file scope.h.

References ledger::value_t::AMOUNT, ledger::value_t::as_amount(), resolve(), and ledger::value_t::to_amount().

+ Here is the call graph for this function:

◆ get() [4/11]

template<>
balance_t ledger::call_scope_t::get ( std::size_t index,
bool convert )
inline

Definition at line 510 of file scope.h.

References ledger::value_t::as_balance(), ledger::value_t::BALANCE, resolve(), and ledger::value_t::to_balance().

+ Here is the call graph for this function:

◆ get() [5/11]

template<>
string ledger::call_scope_t::get ( std::size_t index,
bool convert )
inline

Definition at line 517 of file scope.h.

References ledger::value_t::as_string(), resolve(), ledger::value_t::STRING, and ledger::value_t::to_string().

+ Here is the call graph for this function:

◆ get() [6/11]

template<>
mask_t ledger::call_scope_t::get ( std::size_t index,
bool convert )
inline

Definition at line 524 of file scope.h.

References ledger::value_t::as_mask(), ledger::value_t::MASK, resolve(), and ledger::value_t::to_mask().

+ Here is the call graph for this function:

◆ get() [7/11]

template<>
date_t ledger::call_scope_t::get ( std::size_t index,
bool convert )
inline

Definition at line 531 of file scope.h.

References ledger::value_t::as_date(), ledger::value_t::DATE, resolve(), and ledger::value_t::to_date().

+ Here is the call graph for this function:

◆ get() [8/11]

template<>
datetime_t ledger::call_scope_t::get ( std::size_t index,
bool convert )
inline

Definition at line 538 of file scope.h.

References ledger::value_t::as_datetime(), ledger::value_t::DATETIME, resolve(), and ledger::value_t::to_datetime().

+ Here is the call graph for this function:

◆ get() [9/11]

template<typename T >
T ledger::call_scope_t::get ( std::size_t index,
bool convert = true )

Referenced by ledger::option_t< T >::handler().

+ Here is the caller graph for this function:

◆ get() [10/11]

template<>
int ledger::call_scope_t::get ( std::size_t index,
bool  )
inline

Definition at line 492 of file scope.h.

References ledger::value_t::INTEGER, resolve(), and ledger::value_t::to_int().

+ Here is the call graph for this function:

◆ get() [11/11]

template<>
scope_t * ledger::call_scope_t::get ( std::size_t index,
bool  )
inline

Definition at line 559 of file scope.h.

References ledger::value_t::as_scope(), resolve(), and ledger::value_t::SCOPE.

+ Here is the call graph for this function:

◆ has() [1/11]

bool ledger::call_scope_t::has ( std::size_t index)
inline

Definition at line 351 of file scope.h.

References args, and ledger::value_t::size().

+ Here is the call graph for this function:

◆ has() [2/11]

template<typename T >
bool ledger::call_scope_t::has ( std::size_t index)

◆ has() [3/11]

template<>
bool ledger::call_scope_t::has ( std::size_t index)
inline

Definition at line 404 of file scope.h.

References args, ledger::value_t::BOOLEAN, ledger::value_t::is_null(), resolve(), and ledger::value_t::size().

+ Here is the call graph for this function:

◆ has() [4/11]

template<>
bool ledger::call_scope_t::has ( std::size_t index)
inline

Definition at line 412 of file scope.h.

References args, ledger::value_t::INTEGER, ledger::value_t::is_null(), resolve(), and ledger::value_t::size().

+ Here is the call graph for this function:

◆ has() [5/11]

template<>
bool ledger::call_scope_t::has ( std::size_t index)
inline

Definition at line 420 of file scope.h.

References args, ledger::value_t::INTEGER, ledger::value_t::is_null(), resolve(), and ledger::value_t::size().

+ Here is the call graph for this function:

◆ has() [6/11]

template<>
bool ledger::call_scope_t::has ( std::size_t index)
inline

Definition at line 428 of file scope.h.

References ledger::value_t::AMOUNT, args, ledger::value_t::is_null(), resolve(), and ledger::value_t::size().

+ Here is the call graph for this function:

◆ has() [7/11]

template<>
bool ledger::call_scope_t::has ( std::size_t index)
inline

Definition at line 436 of file scope.h.

References args, ledger::value_t::BALANCE, ledger::value_t::is_null(), resolve(), and ledger::value_t::size().

+ Here is the call graph for this function:

◆ has() [8/11]

template<>
bool ledger::call_scope_t::has ( std::size_t index)
inline

Definition at line 444 of file scope.h.

References args, ledger::value_t::is_null(), resolve(), ledger::value_t::size(), and ledger::value_t::STRING.

+ Here is the call graph for this function:

◆ has() [9/11]

template<>
bool ledger::call_scope_t::has ( std::size_t index)
inline

Definition at line 452 of file scope.h.

References args, ledger::value_t::DATE, ledger::value_t::is_null(), resolve(), and ledger::value_t::size().

+ Here is the call graph for this function:

◆ has() [10/11]

template<>
bool ledger::call_scope_t::has ( std::size_t index)
inline

Definition at line 460 of file scope.h.

References args, ledger::value_t::DATETIME, ledger::value_t::is_null(), resolve(), and ledger::value_t::size().

+ Here is the call graph for this function:

◆ has() [11/11]

template<>
bool ledger::call_scope_t::has ( std::size_t index)
inline

Definition at line 468 of file scope.h.

References args, ledger::value_t::is_null(), resolve(), ledger::value_t::SCOPE, and ledger::value_t::size().

+ Here is the call graph for this function:

◆ lookup()

virtual expr_t::ptr_op_t ledger::child_scope_t::lookup ( const symbol_t::kind_t kind,
const string & name )
inlinevirtualinherited

Implements ledger::scope_t.

Reimplemented in ledger::bind_scope_t, ledger::symbol_scope_t, ledger::value_scope_t, and ledger::session_t.

Definition at line 156 of file scope.h.

References ledger::downcast(), ledger::scope_t::lookup(), and ledger::child_scope_t::parent.

Referenced by ledger::bind_scope_t::lookup(), and ledger::value_scope_t::lookup().

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

◆ operator[]()

value_t & ledger::call_scope_t::operator[] ( const std::size_t index)
inline

Definition at line 342 of file scope.h.

References resolve().

+ Here is the call graph for this function:

◆ pop_back()

void ledger::call_scope_t::pop_back ( )
inline

Definition at line 373 of file scope.h.

References args, and ledger::value_t::pop_back().

+ Here is the call graph for this function:

◆ push_back()

void ledger::call_scope_t::push_back ( const value_t & val)
inline

Definition at line 370 of file scope.h.

References args, ledger::downcast(), and ledger::value_t::push_back().

+ Here is the call graph for this function:

◆ push_front()

void ledger::call_scope_t::push_front ( const value_t & val)
inline

Definition at line 367 of file scope.h.

References args, ledger::downcast(), and ledger::value_t::push_front().

Referenced by ledger::option_t< T >::operator()().

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

◆ resolve()

value_t & ledger::call_scope_t::resolve ( const std::size_t index,
value_t::type_t context = value_t::VOID,
const bool required = false )

Referenced by get(), get(), has(), operator[](), and value().

+ Here is the caller graph for this function:

◆ set_args()

void ledger::call_scope_t::set_args ( const value_t & _args)
inline

Definition at line 332 of file scope.h.

References args, and ledger::downcast().

+ Here is the call graph for this function:

◆ size()

std::size_t ledger::call_scope_t::size ( ) const
inline

Definition at line 395 of file scope.h.

References args, and ledger::value_t::size().

Referenced by ledger::option_t< T >::handler(), ledger::join_args(), and ledger::reporter< Type, handler_ptr, report_method >::operator()().

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

◆ type_context()

virtual value_t::type_t ledger::context_scope_t::type_context ( ) const
inlinevirtualinherited

Reimplemented from ledger::scope_t.

Definition at line 298 of file scope.h.

◆ type_required()

virtual bool ledger::context_scope_t::type_required ( ) const
inlinevirtualinherited

Reimplemented from ledger::scope_t.

Definition at line 301 of file scope.h.

◆ value()

value_t & ledger::call_scope_t::value ( )
inline

Definition at line 335 of file scope.h.

References args, resolve(), and ledger::value_t::size().

Referenced by ledger::reporter< Type, handler_ptr, report_method >::operator()().

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

Member Data Documentation

◆ args

value_t ledger::call_scope_t::args

Definition at line 309 of file scope.h.

Referenced by begin(), begin(), empty(), end(), end(), has(), pop_back(), push_back(), push_front(), set_args(), size(), and value().

◆ default_scope

scope_t* ledger::scope_t::default_scope
staticinherited

◆ depth

const int ledger::call_scope_t::depth

Definition at line 318 of file scope.h.

◆ empty_scope

empty_scope_t* ledger::scope_t::empty_scope
staticinherited

Definition at line 93 of file scope.h.

◆ locus

expr_t::ptr_op_t* ledger::call_scope_t::locus

Definition at line 317 of file scope.h.

◆ parent

◆ ptr

void* ledger::call_scope_t::ptr
mutable

Definition at line 310 of file scope.h.

Referenced by context().


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