fcml  1.2.2
Public Member Functions | Protected Member Functions | Friends | List of all members
fcml::SymbolTable Class Reference
Inheritance diagram for fcml::SymbolTable:
Inheritance graph
[legend]
Collaboration diagram for fcml::SymbolTable:
Collaboration graph
[legend]

Public Member Functions

 SymbolTable ()
 Creates an empty symbol table. More...
 
virtual ~SymbolTable ()
 Destructor. More...
 
void add (const fcml_cstring &symbolName, fcml_int64_t value)
 Adds a new symbol to the table. More...
 
void remove (const fcml_cstring &symbolName)
 Removes symbol from the table. More...
 
bool contains (const fcml_cstring &symbolName) const
 Gets true if there is a symbol for the given name in the table. More...
 
Symbol get (const fcml_cstring &symbolName) const
 Gets the symbol of the given name. More...
 

Protected Member Functions

fcml_st_symbol_tablegetSymbolTable ()
 Gets native FCML symbol table. More...
 

Friends

class SymbolTableAware
 

Constructor & Destructor Documentation

◆ SymbolTable()

fcml::SymbolTable::SymbolTable ( )
inline

Creates an empty symbol table.

Exceptions
InitExceptionThe symbol table can't be allocated.
Since
1.1.0

◆ ~SymbolTable()

virtual fcml::SymbolTable::~SymbolTable ( )
inlinevirtual

Destructor.

Since
1.1.0

Member Function Documentation

◆ add()

void fcml::SymbolTable::add ( const fcml_cstring symbolName,
fcml_int64_t  value 
)
inline

Adds a new symbol to the table.

Parameters
symbolNameThe symbol name.
valueThe symbol value.
Since
1.1.0

◆ contains()

bool fcml::SymbolTable::contains ( const fcml_cstring symbolName) const
inline

Gets true if there is a symbol for the given name in the table.

Parameters
symbolNameThe symbol name.
Returns
true If symbol of the name exists in the table.
Since
1.1.0

◆ get()

Symbol fcml::SymbolTable::get ( const fcml_cstring symbolName) const
inline

Gets the symbol of the given name.

Checks Symbol.isEmpty method of the returned symbol to check if there is such a symbol.

Parameters
symbolNameThe symbol name.
Returns
The found symbol.
Since
1.1.0

◆ getSymbolTable()

fcml_st_symbol_table& fcml::SymbolTable::getSymbolTable ( )
inlineprotected

Gets native FCML symbol table.

Returns
The native symbol table.
Since
1.1.0

◆ remove()

void fcml::SymbolTable::remove ( const fcml_cstring symbolName)
inline

Removes symbol from the table.

Parameters
symbolNameThe symbol name.
Since
1.1.0

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