Canola
0.8.D001
|
#include <method_bool.h>
Public Types | |
typedef boost::shared_ptr < lexer_functor_method_bool > | pointer |
typedef void(calculator::* | method_ptr_t )(bool) |
Public Member Functions | |
virtual | ~lexer_functor_method_bool () |
void | do_it (const location::pointer &where) |
Static Public Member Functions | |
static pointer | create (calculator &subject, method_ptr_t method, bool value) |
Private Member Functions | |
lexer_functor_method_bool (calculator &subject, method_ptr_t method, bool value) | |
lexer_functor_method_bool () | |
lexer_functor_method_bool (const lexer_functor_method_bool &rhs) | |
lexer_functor_method_bool & | operator= (const lexer_functor_method_bool &rhs) |
Private Attributes | |
calculator & | subject |
method_ptr_t | method |
bool | value |
The lexer_functor_method_bool class is used to represent the processing necessary to call an arbitrarty method of the calculator in response to a keyword being observed in the lexer.
Definition at line 30 of file method_bool.h.
typedef void(calculator::* lexer_functor_method_bool::method_ptr_t)(bool) |
Definition at line 41 of file method_bool.h.
typedef boost::shared_ptr<lexer_functor_method_bool> lexer_functor_method_bool::pointer |
Reimplemented from lexer_functor.
Definition at line 34 of file method_bool.h.
lexer_functor_method_bool::~lexer_functor_method_bool | ( | ) | [virtual] |
The destructor.
Definition at line 21 of file method_bool.cc.
lexer_functor_method_bool::lexer_functor_method_bool | ( | calculator & | subject, |
method_ptr_t | method, | ||
bool | value | ||
) | [private] |
The constructor. It is private on purpose, use the create class method instead.
subject | The calculator object to operate upon. |
method | The calculator method to be called. |
value | the boolean value to pass to the method. |
Definition at line 26 of file method_bool.cc.
lexer_functor_method_bool::lexer_functor_method_bool | ( | ) | [private] |
The default constructor. Do not use.
lexer_functor_method_bool::lexer_functor_method_bool | ( | const lexer_functor_method_bool & | rhs | ) | [private] |
The copy constructor. Do not use.
rhs | The right hand side of the initialization. |
lexer_functor_method_bool::pointer lexer_functor_method_bool::create | ( | calculator & | subject, |
method_ptr_t | method, | ||
bool | value | ||
) | [static] |
The create class method is used to create new dynamically allocated instance of this class.
subject | The calculator object to operate upon. |
method | The calculator method to be called. |
value | the boolean value to pass to the method. |
Definition at line 39 of file method_bool.cc.
void lexer_functor_method_bool::do_it | ( | const location::pointer & | where | ) | [virtual] |
The do_it method is provided by each derived class, to actually perform the actions of the functor.
Implements lexer_functor.
Definition at line 47 of file method_bool.cc.
lexer_functor_method_bool& lexer_functor_method_bool::operator= | ( | const lexer_functor_method_bool & | rhs | ) | [private] |
The assignment operator. Do not use.
rhs | The right hand side of the assignment. |
The method instance variable is used to remember the calculator method to be called.
Definition at line 84 of file method_bool.h.
calculator& lexer_functor_method_bool::subject [private] |
The subject instance variable is used to remember the calculator object to operate upon.
Definition at line 78 of file method_bool.h.
bool lexer_functor_method_bool::value [private] |
The value instance variable is used to remember the boolean value to pass to the method.
Definition at line 90 of file method_bool.h.