dlvhex
2.5.0
|
Lookup tables for terms. More...
#include <include/dlvhex2/TermTable.h>
Public Types | |
typedef Container::index < impl::AddressTag >::type | AddressIndex |
typedef Container::index < impl::TermTag >::type | TermIndex |
Public Member Functions | |
const Term & | getByID (ID id) const throw () |
Retrieve by ID. | |
ID | getIDByString (const std::string &str) const throw () |
Given string, look if already stored. | |
ID | storeAndGetID (const Term &symb) throw () |
Store term in the table. |
Lookup tables for terms.
Definition at line 50 of file TermTable.h.
typedef Container::index<impl::AddressTag>::type TermTable::AddressIndex |
Definition at line 70 of file TermTable.h.
typedef Container::index<impl::TermTag>::type TermTable::TermIndex |
Definition at line 71 of file TermTable.h.
const Term & TermTable::getByID | ( | ID | id | ) | const throw () [inline] |
Retrieve by ID.
Assert that id.kind is correct for Term. Assert that ID exists.
id
. Definition at line 105 of file TermTable.h.
Referenced by BOOST_AUTO_TEST_CASE(), Registry::getOutVariablesInID(), Registry::getVariablesInID(), RawPrinter::print(), Registry::replaceVariablesInTerm(), FunctionDecomposeAtom::retrieve(), IsFunctionTermAtom::retrieve(), GetArityAtom::retrieve(), FunctionDecomposeGeneralAtom::retrieve(), FunctionInterprete::retrieve(), and Term::updateSymbolOfNestedTerm().
ID TermTable::getIDByString | ( | const std::string & | str | ) | const throw () [inline] |
Given string, look if already stored.
str | Term string to lookup. |
Definition at line 121 of file TermTable.h.
References ID_FAIL().
Referenced by BOOST_AUTO_TEST_CASE(), Registry::getAuxiliaryConstantSymbol(), Registry::getAuxiliaryVariableSymbol(), Registry::getNewConstantTerm(), Registry::replaceVariablesInTerm(), FunctionComposeAtom::retrieve(), Registry::storeConstantTerm(), Registry::storeConstOrVarTerm(), and Registry::storeVariableTerm().
ID TermTable::storeAndGetID | ( | const Term & | symb | ) | throw () [inline] |
Store term in the table.
Store symbol, assuming it does not exist. Assert that symbol did not exist.
symb | Term to store. |
Definition at line 166 of file TermTable.h.
Referenced by BOOST_AUTO_TEST_CASE(), Registry::getAuxiliaryConstantSymbol(), Registry::getAuxiliaryVariableSymbol(), Registry::replaceVariablesInTerm(), FunctionComposeAtom::retrieve(), Registry::storeConstantTerm(), Registry::storeConstOrVarTerm(), and Registry::storeVariableTerm().