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

#include <opcode.h>

Inheritance diagram for lexer_functor_opcode:
lexer_functor

List of all members.

Public Types

typedef boost::shared_ptr
< lexer_functor_opcode
pointer

Public Member Functions

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

Static Public Member Functions

static pointer create (calculator &subject, opcode_t op)

Private Member Functions

 lexer_functor_opcode (calculator &subject, opcode_t op)
 lexer_functor_opcode ()
 lexer_functor_opcode (const lexer_functor_opcode &rhs)
lexer_functor_opcodeoperator= (const lexer_functor_opcode &rhs)

Private Attributes

calculatorsubject
opcode_t op

Detailed Description

The lexer_functor_opcode class is used to represent the processing required when the lexer sees a keyword that matches an opcode name. It is passed to the calculator::on_opcode method.

Definition at line 31 of file opcode.h.


Member Typedef Documentation

Reimplemented from lexer_functor.

Definition at line 35 of file opcode.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 22 of file opcode.cc.

The constructor. It is private on purpose, use the create class method instead.

Parameters:
subjectThe calculator object on which to operate.
opThe opcode the calculator is to perform.

Definition at line 27 of file opcode.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 on which to operate.
opThe opcode the claculator is to perform.

Definition at line 38 of file opcode.cc.

void lexer_functor_opcode::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 45 of file opcode.cc.

lexer_functor_opcode& lexer_functor_opcode::operator= ( const lexer_functor_opcode rhs) [private]

The assignment operator. Do not use.

Parameters:
rhsThe right hand side of the assignment.

Member Data Documentation

The op instance variable is used to remember the opcode the calculator is to perform.

Definition at line 78 of file opcode.h.

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

Definition at line 72 of file opcode.h.


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