dlvhex  2.5.0
TermTable Class Reference

Lookup tables for terms. More...

#include <include/dlvhex2/TermTable.h>

Inheritance diagram for TermTable:
Collaboration diagram for TermTable:

Public Types

typedef Container::index
< impl::AddressTag >::type 
AddressIndex
typedef Container::index
< impl::TermTag >::type 
TermIndex

Public Member Functions

const TermgetByID (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.

Detailed Description

Lookup tables for terms.

Definition at line 50 of file TermTable.h.


Member Typedef Documentation

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.


Member Function Documentation

ID TermTable::getIDByString ( const std::string &  str) const throw () [inline]

Given string, look if already stored.

Parameters:
strTerm string to lookup.
Returns:
ID_FAIL if term is not stored, otherwise return term ID.

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.

Parameters:
symbTerm to store.
Returns:
ID of the stored term.

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().


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