Canola  0.8.D001
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
lexer_functor_method_bool Class Reference

#include <method_bool.h>

Inheritance diagram for lexer_functor_method_bool:
lexer_functor

List of all members.

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_booloperator= (const lexer_functor_method_bool &rhs)

Private Attributes

calculatorsubject
method_ptr_t method
bool value

Detailed Description

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.


Member Typedef Documentation

typedef void(calculator::* lexer_functor_method_bool::method_ptr_t)(bool)

Definition at line 41 of file method_bool.h.

Reimplemented from lexer_functor.

Definition at line 34 of file method_bool.h.


Constructor & Destructor Documentation

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.

Parameters:
subjectThe calculator object to operate upon.
methodThe calculator method to be called.
valuethe boolean value to pass to the method.

Definition at line 26 of file method_bool.cc.

The default constructor. Do not use.

The copy constructor. Do not use.

Parameters:
rhsThe right hand side of the initialization.

Member Function Documentation

The create class method is used to create new dynamically allocated instance of this class.

Parameters:
subjectThe calculator object to operate upon.
methodThe calculator method to be called.
valuethe 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.

Parameters:
rhsThe right hand side of the assignment.

Member Data Documentation

The method instance variable is used to remember the calculator method to be called.

Definition at line 84 of file method_bool.h.

The subject instance variable is used to remember the calculator object to operate upon.

Definition at line 78 of file method_bool.h.

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.


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