#include <Y2Namespace.h>
Inheritance diagram for Y2Namespace:

Public Member Functions | |
| Y2Namespace () | |
| virtual | ~Y2Namespace () |
| void | finish () |
| virtual const string | name () const |
| what namespace do we implement | |
| virtual const string | filename () const=0 |
| used for error reporting | |
| virtual unsigned int | symbolCount () const |
| gives the number of symbol declarations | |
| virtual SymbolEntryPtr | symbolEntry (unsigned int position) const |
| access to definitions of this namespace | |
| virtual string | toString () const |
| unparse. useful for debugging | |
| string | symbolsToString () const |
| virtual YCPValue | evaluate (bool cse=false)=0 |
| called when evaluating the import statement | |
| virtual SymbolTable * | table () const |
| get our whole symbol table? | |
| void | createTable () |
| virtual Y2Function * | createFunctionCall (const string name, constFunctionTypePtr type)=0 |
| void | pushToStack () |
| void | popFromStack () |
| virtual void | initialize () |
Protected Types | |
| typedef vector< SymbolEntryPtr > | symbols_t |
Protected Member Functions | |
| unsigned int | addSymbol (SymbolEntryPtr sentry) |
| void | enterSymbol (SymbolEntryPtr sentry, Point *point=0) |
| SymbolEntryPtr | lookupSymbol (const char *name) const |
| void | releaseSymbol (unsigned int position) |
Protected Attributes | |
| SymbolTable * | m_table |
| unsigned int | m_symbolcount |
| symbols_t | m_symbols |
| bool | m_initialized |
Friends | |
| class | SymbolTable |
typedef vector<SymbolEntryPtr> Y2Namespace::symbols_t [protected] |
| Y2Namespace::Y2Namespace | ( | ) |
| Y2Namespace::~Y2Namespace | ( | ) | [virtual] |
| unsigned int Y2Namespace::addSymbol | ( | SymbolEntryPtr | sentry | ) | [protected] |
| void Y2Namespace::enterSymbol | ( | SymbolEntryPtr | sentry, | |
| Point * | point = 0 | |||
| ) | [protected] |
| SymbolEntryPtr Y2Namespace::lookupSymbol | ( | const char * | name | ) | const [protected] |
| void Y2Namespace::releaseSymbol | ( | unsigned int | position | ) | [protected] |
| void Y2Namespace::finish | ( | ) |
| const string Y2Namespace::name | ( | ) | const [virtual] |
| virtual const string Y2Namespace::filename | ( | ) | const [pure virtual] |
| unsigned int Y2Namespace::symbolCount | ( | ) | const [virtual] |
gives the number of symbol declarations
| SymbolEntryPtr Y2Namespace::symbolEntry | ( | unsigned int | position | ) | const [virtual] |
access to definitions of this namespace
| string Y2Namespace::toString | ( | ) | const [virtual] |
| string Y2Namespace::symbolsToString | ( | ) | const |
| virtual YCPValue Y2Namespace::evaluate | ( | bool | cse = false |
) | [pure virtual] |
| SymbolTable * Y2Namespace::table | ( | ) | const [virtual] |
| void Y2Namespace::createTable | ( | ) |
| virtual Y2Function* Y2Namespace::createFunctionCall | ( | const string | name, | |
| constFunctionTypePtr | type | |||
| ) | [pure virtual] |
Creates a function call instance, which can be used to call a function from this namespace. The object is NOT owned anymore by this instance, the caller can (and should) delete it.
| name | name of the required function | |
| type | the type of the function (needed for overloading) |
Implemented in YBlock, and Y2SystemNamespace.
| void Y2Namespace::pushToStack | ( | ) |
| void Y2Namespace::popFromStack | ( | ) |
| void Y2Namespace::initialize | ( | ) | [virtual] |
friend class SymbolTable [friend] |
SymbolTable* Y2Namespace::m_table [protected] |
unsigned int Y2Namespace::m_symbolcount [protected] |
symbols_t Y2Namespace::m_symbols [protected] |
bool Y2Namespace::m_initialized [protected] |
1.5.0