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

#include <method.h>

Inheritance diagram for lexer_functor_method:
lexer_functor

List of all members.

Public Types

typedef boost::shared_ptr
< lexer_functor_method
pointer
typedef void(calculator::* method_ptr_t )(void)

Public Member Functions

virtual ~lexer_functor_method ()
void do_it (const location::pointer &where)

Static Public Member Functions

static pointer create (calculator &subject, method_ptr_t method)

Private Member Functions

 lexer_functor_method (calculator &subject, method_ptr_t method)
 lexer_functor_method ()
 lexer_functor_method (const lexer_functor_method &rhs)
lexer_functor_methodoperator= (const lexer_functor_method &rhs)

Private Attributes

calculatorsubject
method_ptr_t method

Detailed Description

The lexer_functor_method 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.h.


Member Typedef Documentation

typedef void(calculator::* lexer_functor_method::method_ptr_t)(void)

Definition at line 41 of file method.h.

Reimplemented from lexer_functor.

Definition at line 34 of file method.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 21 of file method.cc.

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.

Definition at line 26 of file method.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.

Definition at line 37 of file method.cc.

void lexer_functor_method::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 44 of file method.cc.

lexer_functor_method& lexer_functor_method::operator= ( const lexer_functor_method 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 79 of file method.h.

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

Definition at line 73 of file method.h.


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