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
void * ptr

Static Public Attributes

static scope_tdefault_scope
static empty_scope_tempty_scope

Detailed Description

Definition at line 304 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 384 of file scope.h.

◆ iterator

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

Definition at line 375 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 318 of file scope.h.

References call_scope_t(), ledger::context_scope_t::context_scope_t(), depth, locus, ptr, TRACE_CTOR, ledger::context_scope_t::type_context(), and ledger::context_scope_t::type_required().

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

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

◆ ~call_scope_t()

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

Definition at line 326 of file scope.h.

References call_scope_t(), and TRACE_DTOR.

Here is the call graph for this function:

Member Function Documentation

◆ begin() [1/2]

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

Definition at line 377 of file scope.h.

References args.

◆ begin() [2/2]

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

Definition at line 386 of file scope.h.

References args.

◆ context()

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

Definition at line 358 of file scope.h.

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

Referenced by resolve().

Here is the call graph for this function:
Here is the caller 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 parent.

◆ description()

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

Implements ledger::scope_t.

Definition at line 292 of file scope.h.

References ledger::child_scope_t::parent.

◆ empty()

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

Definition at line 396 of file scope.h.

References args.

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

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 380 of file scope.h.

References args.

◆ end() [2/2]

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

Definition at line 389 of file scope.h.

References args.

◆ get() [1/11]

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

Definition at line 483 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 494 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 501 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 508 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 515 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 522 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 529 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 536 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::call_scope_t::get< expr_t::ptr_op_t >(), and 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 490 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 557 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 349 of file scope.h.

References args.

Referenced by ledger::call_scope_t::has< expr_t::ptr_op_t >().

Here is the caller 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 402 of file scope.h.

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

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 410 of file scope.h.

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

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 418 of file scope.h.

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

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 426 of file scope.h.

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

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 434 of file scope.h.

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

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 442 of file scope.h.

References args, resolve(), 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 450 of file scope.h.

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

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 458 of file scope.h.

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

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 466 of file scope.h.

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

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::session_t, ledger::symbol_scope_t, and ledger::value_scope_t.

Definition at line 156 of file scope.h.

References parent.

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

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 340 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 371 of file scope.h.

References args.

◆ push_back()

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

Definition at line 368 of file scope.h.

References args.

◆ push_front()

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

Definition at line 365 of file scope.h.

References args.

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

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 )

References context(), and ledger::value_t::VOID.

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

Here is the call graph for this function:
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 330 of file scope.h.

References args.

◆ size()

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

Definition at line 393 of file scope.h.

References args.

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

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 296 of file scope.h.

Referenced by ledger::call_scope_t::call_scope_t().

Here is the caller graph for this function:

◆ type_required()

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

Reimplemented from ledger::scope_t.

Definition at line 299 of file scope.h.

Referenced by ledger::call_scope_t::call_scope_t().

Here is the caller graph for this function:

◆ value()

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

Definition at line 333 of file scope.h.

References args, and resolve().

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 307 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 316 of file scope.h.

Referenced by call_scope_t().

◆ 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 315 of file scope.h.

Referenced by call_scope_t().

◆ parent

◆ ptr

void* ledger::call_scope_t::ptr
mutable

Definition at line 308 of file scope.h.

Referenced by call_scope_t(), and context().


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