Public Types | |
typedef Symbol | Sym |
typedef std::set< Sym > ::const_iterator | const_iterator |
Public Member Functions | |
SymbolStorage () | |
SymbolStorage (const SymbolStorage &other) | |
SymbolStorage & | operator= (const SymbolStorage &other) |
const std::set< Sym > & | getSymbols () const |
provides access to all symbols | |
bool | isSymbol (Sym sym) const |
tests whether the given symbol is a valid symbol | |
bool | addSymbol (Sym sym) |
add the given symbol | |
void | addAllSymbols (SymbolStorage symSet) |
add all the symbols in the given collection to this collection | |
bool | removeSymbol (Sym sym) |
remove the given symbol | |
void | removeAll (SymbolStorage symSet) |
remove all the symbols in the given collection from this collection | |
void | clearSymbols () |
removes all symbols | |
std::ostream & | print (std::ostream &o) const |
print the collection of symbols | |
bool | operator== (const SymbolStorage &other) const |
tests whether this collection of symbols is equivalent to the collection of symbols 'other' | |
const_iterator | beginSymbols () const |
provides access to the symbols in the collection | |
const_iterator | endSymbols () const |
provides access to the symbols in the collection | |
size_t | sizeSymbols () const |
returns the number of symbols in this collection | |
Static Public Member Functions | |
static std::string const & | XMLSymbolTag () |
static std::string const & | XMLNameAttr () |
typedef std::set<Sym>::const_iterator opennwa::details::SymbolStorage::const_iterator |
opennwa::details::SymbolStorage::SymbolStorage | ( | ) |
References addSymbol(), and opennwa::EPSILON.
opennwa::details::SymbolStorage::SymbolStorage | ( | const SymbolStorage & | other | ) |
static std::string const& opennwa::details::SymbolStorage::XMLSymbolTag | ( | ) | [static] |
Referenced by opennwa::Nwa::marshall().
static std::string const& opennwa::details::SymbolStorage::XMLNameAttr | ( | ) | [static] |
Referenced by opennwa::Nwa::marshall().
SymbolStorage & opennwa::details::SymbolStorage::operator= | ( | const SymbolStorage & | other | ) |
const std::set< SymbolStorage::Sym > & opennwa::details::SymbolStorage::getSymbols | ( | ) | const |
provides access to all symbols
This method provides access to all symbols in the form of a set of symbols.
Referenced by opennwa::Nwa::getSymbols().
bool opennwa::details::SymbolStorage::isSymbol | ( | Sym | sym | ) | const |
tests whether the given symbol is a valid symbol
This method determines whether the given symbol is a valid symbol in the symbol pool. If it is, true is returned, otherwise, false is returned.
- | sym: the symbol to test |
- | sym: the symbol to test |
Referenced by opennwa::Nwa::isSymbol().
bool opennwa::details::SymbolStorage::addSymbol | ( | Sym | sym | ) |
add the given symbol
This method adds the given symbol. If the symbol already exists, false is returned. Otherwise, true is returned.
- | sym: the symbol to add |
- | sym: the symbol to add |
References opennwa::EPSILON, and opennwa::WILD.
Referenced by opennwa::Nwa::addSymbol(), clearSymbols(), and SymbolStorage().
void opennwa::details::SymbolStorage::addAllSymbols | ( | SymbolStorage | symSet | ) |
add all the symbols in the given collection to this collection
This method adds all of the symbols in the given collection of symbols to this collection of symbols.
- | symSet: the collection of symbols to add to this collection of symbols | |
- | symSet: the collection of symbols to add to this collection of symbols |
Referenced by opennwa::Nwa::addAllSymbols().
bool opennwa::details::SymbolStorage::removeSymbol | ( | Sym | sym | ) |
remove the given symbol
This method removes the given symbol. If the symbol does not exist, false is returned. Otherwise, true is returned.
- | sym: the symbol to remove |
- | sym: the symbol to remove |
Referenced by opennwa::Nwa::removeSymbol().
void opennwa::details::SymbolStorage::removeAll | ( | SymbolStorage | symSet | ) |
remove all the symbols in the given collection from this collection
This method removes all of the symbols in the given collection of symbols from this collection of symbols.
- | symSet: the collection of symbols to remove from this collection | |
- | symSet: the collection of symbols to remove from this collection |
void opennwa::details::SymbolStorage::clearSymbols | ( | ) |
removes all symbols
This method removes all symbols from this collection.
References addSymbol(), and opennwa::EPSILON.
Referenced by opennwa::Nwa::clearSymbols().
std::ostream & opennwa::details::SymbolStorage::print | ( | std::ostream & | o | ) | const [virtual] |
print the collection of symbols
This method prints out the symbol set to the output stream provided.
- | o: the output stream to print to |
- | o: the output stream to print to |
Implements wali::Printable.
References opennwa::EPSILON, and wali::printKey().
Referenced by opennwa::Nwa::print().
bool opennwa::details::SymbolStorage::operator== | ( | const SymbolStorage & | other | ) | const |
tests whether this collection of symbols is equivalent to the collection of symbols 'other'
This method tests the equivalence of this set of symbols and the set of symbols 'other'.
- | other: the SymbolStorage to which to compare this SymbolStorage |
- | other: the SymbolStorage to which to compare this SymbolStorage |
SymbolStorage::const_iterator opennwa::details::SymbolStorage::beginSymbols | ( | ) | const |
provides access to the symbols in the collection
This method provides access to the symbols in this collection through an iterator.
Referenced by opennwa::Nwa::_private_isDeterministic_(), opennwa::details::Label::addAll(), opennwa::Nwa::beginSymbols(), opennwa::details::Label::getAnySymbol(), opennwa::details::Label::getSymbolsIn(), opennwa::details::Label::getSymbolsNotIn(), opennwa::details::Label::isAbsent(), opennwa::details::Label::isWild(), and opennwa::details::Label::removeAll().
SymbolStorage::const_iterator opennwa::details::SymbolStorage::endSymbols | ( | ) | const |
provides access to the symbols in the collection
This method provides access to the symbols in the collection through an iterator.
Referenced by opennwa::Nwa::_private_isDeterministic_(), opennwa::details::Label::addAll(), opennwa::Nwa::endSymbols(), opennwa::details::Label::getAnySymbol(), opennwa::details::Label::getSymbolsIn(), opennwa::details::Label::getSymbolsNotIn(), opennwa::details::Label::isAbsent(), opennwa::details::Label::isWild(), and opennwa::details::Label::removeAll().
size_t opennwa::details::SymbolStorage::sizeSymbols | ( | ) | const |
returns the number of symbols in this collection
This method returns the number of symbols in this collection.
Referenced by opennwa::Nwa::sizeSymbols(), opennwa::details::Label::sizeSymbolsIn(), and opennwa::details::Label::sizeSymbolsNotIn().