#include <option.h>
Public Member Functions | |
string | desc () const |
value_t | handler (call_scope_t &args) |
virtual void | handler_thunk (const optional< string > &) |
virtual void | handler_thunk (const optional< string > &, const string &) |
void | off () |
void | on (const char *whence) |
void | on (const char *whence, const string &str) |
void | on (const optional< string > &whence) |
void | on (const optional< string > &whence, const string &str) |
operator bool () const | |
virtual value_t | operator() (call_scope_t &args) |
option_t (const char *_name, const char _ch='\0') | |
option_t (const option_t &other) | |
void | report (std::ostream &out) const |
string | str () const |
virtual | ~option_t () |
Public Attributes | |
T * | parent |
string | value |
bool | wants_arg |
Protected Member Functions | |
option_t & | operator= (const option_t &) |
Protected Attributes | |
const char | ch |
bool | handled |
const char * | name |
string::size_type | name_len |
optional< string > | source |
|
inline |
Definition at line 71 of file option.h.
References DEBUG, ledger::option_t< T >::name, and TRACE_CTOR.
|
inline |
Definition at line 78 of file option.h.
References TRACE_CTOR.
|
inlinevirtual |
Definition at line 90 of file option.h.
References TRACE_DTOR.
|
inline |
Definition at line 110 of file option.h.
References ledger::option_t< T >::ch, ledger::downcast(), and ledger::option_t< T >::name.
Referenced by ledger::option_t< T >::handler(), ledger::option_t< T >::report(), and ledger::option_t< T >::str().
|
inline |
Definition at line 171 of file option.h.
References ledger::option_t< T >::desc(), ledger::downcast(), ledger::call_scope_t::get(), ledger::option_t< T >::on(), ledger::call_scope_t::size(), throw_, and ledger::option_t< T >::wants_arg.
Referenced by ledger::option_t< T >::operator()().
|
inlinevirtual |
Reimplemented in ledger::global_scope_t::helpoption_t, ledger::global_scope_t::versionoption_t, ledger::report_t::actualoption_t, ledger::report_t::add_budgetoption_t, ledger::report_t::averageoption_t, ledger::report_t::basisoption_t, ledger::report_t::budgetoption_t, ledger::report_t::clearedoption_t, ledger::report_t::collapseoption_t, ledger::report_t::collapse_if_zerooption_t, ledger::report_t::currentoption_t, ledger::report_t::dailyoption_t, ledger::report_t::dcoption_t, ledger::report_t::deviationoption_t, ledger::report_t::gainoption_t, ledger::report_t::historicaloption_t, ledger::report_t::invertoption_t, ledger::report_t::average_lot_pricesoption_t, ledger::report_t::marketoption_t, ledger::report_t::monthlyoption_t, ledger::report_t::no_coloroption_t, ledger::report_t::no_revaluedoption_t, ledger::report_t::no_pageroption_t, ledger::report_t::pendingoption_t, ledger::report_t::percentoption_t, ledger::report_t::priceoption_t, ledger::report_t::quantityoption_t, ledger::report_t::quarterlyoption_t, ledger::report_t::realoption_t, ledger::report_t::related_alloption_t, ledger::report_t::time_reportoption_t, ledger::report_t::unbudgetedoption_t, ledger::report_t::unclearedoption_t, ledger::report_t::unroundoption_t, ledger::report_t::weeklyoption_t, ledger::report_t::wideoption_t, ledger::report_t::yearlyoption_t, ledger::session_t::decimal_commaoption_t, and ledger::session_t::time_colonoption_t.
Definition at line 168 of file option.h.
Referenced by ledger::option_t< T >::on(), and ledger::option_t< T >::on().
|
inlinevirtual |
Reimplemented in ledger::report_t::amount_option_t, ledger::report_t::begin_option_t, ledger::report_t::bold_if_option_t, ledger::report_t::depth_option_t, ledger::report_t::display_option_t, ledger::report_t::display_amount_option_t, ledger::report_t::display_total_option_t, ledger::report_t::end_option_t, ledger::report_t::exchange_option_t, ledger::report_t::group_by_option_t, ledger::report_t::limit_option_t, ledger::report_t::now_option_t, ledger::report_t::only_option_t, ledger::report_t::period_option_t, ledger::report_t::revalued_total_option_t, ledger::report_t::sort_option_t, ledger::report_t::sort_all_option_t, ledger::report_t::sort_xacts_option_t, ledger::report_t::total_option_t, ledger::session_t::file_option_t, ledger::session_t::hashes_option_t, ledger::session_t::input_date_format_option_t, and ledger::report_t::truncate_option_t.
|
inline |
Definition at line 162 of file option.h.
References ledger::downcast(), ledger::option_t< T >::handled, ledger::option_t< T >::source, and ledger::option_t< T >::value.
|
inline |
Definition at line 137 of file option.h.
References ledger::option_t< T >::on().
Referenced by ledger::option_t< T >::handler(), ledger::option_t< T >::on(), and ledger::option_t< T >::on().
|
inline |
Definition at line 147 of file option.h.
References ledger::option_t< T >::on(), and ledger::option_t< T >::str().
Definition at line 140 of file option.h.
References ledger::option_t< T >::handled, ledger::option_t< T >::handler_thunk(), and ledger::option_t< T >::source.
|
inline |
Definition at line 150 of file option.h.
References ledger::downcast(), ledger::option_t< T >::handled, ledger::option_t< T >::handler_thunk(), ledger::option_t< T >::source, ledger::option_t< T >::str(), and ledger::option_t< T >::value.
|
inline |
Definition at line 126 of file option.h.
References ledger::option_t< T >::handled.
|
inlinevirtual |
Definition at line 193 of file option.h.
References ledger::call_scope_t::empty(), ledger::option_t< T >::handled, ledger::option_t< T >::handler(), ledger::call_scope_t::push_front(), ledger::string_value(), ledger::option_t< T >::value, and ledger::option_t< T >::wants_arg.
|
protected |
|
inline |
Definition at line 94 of file option.h.
References ledger::option_t< T >::desc(), ledger::option_t< T >::handled, ledger::option_t< T >::source, ledger::option_t< T >::value, and ledger::option_t< T >::wants_arg.
|
inline |
Definition at line 130 of file option.h.
References assert, ledger::option_t< T >::desc(), ledger::downcast(), ledger::option_t< T >::handled, throw_, and ledger::option_t< T >::value.
Referenced by ledger::option_t< T >::on(), and ledger::option_t< T >::on().
|
protected |
Definition at line 60 of file option.h.
Referenced by ledger::option_t< T >::desc().
|
protected |
Definition at line 61 of file option.h.
Referenced by ledger::option_t< T >::off(), ledger::option_t< T >::on(), ledger::option_t< T >::on(), ledger::option_t< T >::operator bool(), ledger::option_t< T >::operator()(), ledger::option_t< T >::report(), and ledger::option_t< T >::str().
|
protected |
Definition at line 58 of file option.h.
Referenced by ledger::option_t< T >::desc(), and ledger::option_t< T >::option_t().
|
protected |
T* ledger::option_t< T >::parent |
|
protected |
Definition at line 62 of file option.h.
Referenced by ledger::option_t< T >::off(), ledger::option_t< T >::on(), ledger::option_t< T >::on(), and ledger::option_t< T >::report().
string ledger::option_t< T >::value |
Definition at line 68 of file option.h.
Referenced by ledger::option_t< T >::off(), ledger::option_t< T >::on(), ledger::option_t< T >::operator()(), ledger::option_t< T >::report(), and ledger::option_t< T >::str().
bool ledger::option_t< T >::wants_arg |
Definition at line 69 of file option.h.
Referenced by ledger::option_t< T >::handler(), ledger::option_t< T >::operator()(), and ledger::option_t< T >::report().