class
Macro
: public Object
(Return to index)
Abstract base class for macros.
The base class for storing the ``archetype'' for all macro-like commands.
Type: |
Abstract |
Superclasses: |
public Object |
Include file: |
./MadParser/Macro.hh |
Inheritance
Synopsis (including inherited members):
- Public members:
- Protected Members:
Documentation:
- Public members:
-
Macro
(int,const char*,const char*)
;
- Exemplar constructor.
-
Macro
(const string&,Object*)
;
- Clone constructor.
-
virtual Macro* clone
(const string&)
;
- Make clone.
Throw ParseError, since for macro we must make a template and not
a clone.
-
virtual const string getCategory
()const
;
- Return the object category as a string.
Return the string "MACRO".
-
virtual Object* makeInstance
(const string&,Statement&)
= 0
;
- Make a macro instance.
If this is a macro template, make an instance.
-
virtual Object* makeTemplate
(const string&,TokenStream&,Statement&)
= 0
;
- Make a macro template.
If this is a macro exemplar, make a template.
-
virtual void parseActuals
(Statement&)
;
- Parse actual arguments.
Expects parse pointer in the statement to be set on the first argument.
-
virtual void parseFormals
(Statement&)
;
- Parse formal arguments.
Expects parse pointer in the statement to be set on the first argument.
-
virtual bool shouldTrace
()const
;
- Trace flag.
If true, the object's execute() function should be traced.
Always false for macros.
-
virtual bool shouldUpdate
()const
;
- Update flag.
If true, the data structure should be updated before calling execute().
Always false for macros.
- Protected members:
-
std::vector<std::vector<Token> > actuals
;
- The actual argument list.
Each actual argument is stored as a vector of tokens.
-
std::vector<string> formals
;
- The formal argument list.
Each formal argument is represented as a name and stored as a string.
Documentation generated by fci on Mon Feb 7 12:29:57 2000