SymbolTable Class Reference

#include <SymbolTable.h>

List of all members.

Public Types

typedef bool(* EntryConsumer )(const SymbolEntry &)

Public Member Functions

size_t mem_size () const
 SymbolTable (int prime)
 ~SymbolTable ()
void tableCopy (Y2Namespace *tofill) const
int size () const
void forEach (EntryConsumer consumer) const
TableEntryenter (const char *key, SymbolEntryPtr entry, const Point *point)
TableEntryenter (TableEntry *entry)
TableEntryfind (const char *key, SymbolEntry::category_t category=SymbolEntry::c_unspec)
TableEntryxref (const char *key)
void remove (TableEntry *entry)
void openXRefs ()
void closeXRefs ()
SymbolEntryPtr getXRef (unsigned int position) const
void startUsage ()
int countUsage ()
void endUsage ()
void enableUsage ()
void disableUsage ()
std::ostream & writeUsage (std::ostream &str) const
std::ostream & writeXmlUsage (std::ostream &str, int indent) const
string toString () const
string toStringSymbols () const

Private Types

typedef std::stack
< std::vector< TableEntry * > * > 
xrefs_t

Private Member Functions

int hash (const char *s)

Private Attributes

int m_prime
TableEntry ** m_table
bool m_track_usage
std::map< const char
*, TableEntry * > * 
m_used
xrefs_tm_xrefs


Member Typedef Documentation

typedef bool(* SymbolTable::EntryConsumer)(const SymbolEntry &)

typedef std::stack<std::vector<TableEntry *> *> SymbolTable::xrefs_t [private]


Constructor & Destructor Documentation

SymbolTable::SymbolTable ( int  prime  ) 

References m_prime, and m_table.

SymbolTable::~SymbolTable (  ) 


Member Function Documentation

void SymbolTable::closeXRefs (  ) 

int SymbolTable::countUsage (  ) 

References m_used.

void SymbolTable::disableUsage (  ) 

References m_track_usage, and y2debug.

Referenced by Import::import(), and Y2Namespace::initialize().

void SymbolTable::enableUsage (  ) 

void SymbolTable::endUsage (  ) 

References m_used, and y2debug.

Referenced by Parser::init(), and ~SymbolTable().

TableEntry * SymbolTable::enter ( TableEntry entry  ) 

TableEntry * SymbolTable::enter ( const char *  key,
SymbolEntryPtr  entry,
const Point point 
)

TableEntry * SymbolTable::find ( const char *  key,
SymbolEntry::category_t  category = SymbolEntry::c_unspec 
)

void SymbolTable::forEach ( SymbolTable::EntryConsumer  consumer  )  const

call the consumer for each entry (or until it requests a break)

Example: static bool MyClass::DoIt (const SymbolEntry & se) { cout << se.name() << endl; return true; }

void MyClass::Foo () { my_y2namespace->table()->forEach (&DoIt); }

References TableEntry::m_next, m_prime, m_table, and TableEntry::sentry().

SymbolEntryPtr SymbolTable::getXRef ( unsigned int  position  )  const

References m_xrefs, and y2error.

Referenced by Bytecode::readEntry().

int SymbolTable::hash ( const char *  s  )  [private]

References m_prime.

Referenced by enter(), find(), and remove().

size_t SymbolTable::mem_size (  )  const [inline]

void SymbolTable::openXRefs (  ) 

void SymbolTable::remove ( TableEntry entry  ) 

int SymbolTable::size (  )  const

References m_prime.

Referenced by Y2PluginComponent::locateSym().

void SymbolTable::startUsage (  ) 

References m_used, and y2debug.

Referenced by Import::import(), and Parser::init().

void SymbolTable::tableCopy ( Y2Namespace tofill  )  const

string SymbolTable::toString ( void   )  const

string SymbolTable::toStringSymbols (  )  const

std::ostream & SymbolTable::writeUsage ( std::ostream &  str  )  const

std::ostream & SymbolTable::writeXmlUsage ( std::ostream &  str,
int  indent 
) const

TableEntry * SymbolTable::xref ( const char *  key  ) 

References SymbolEntry::c_unspec, find(), and m_xrefs.

Referenced by YSImport::YSImport().


Member Data Documentation

int SymbolTable::m_prime [private]

Referenced by disableUsage(), enableUsage(), and find().

std::map<const char *, TableEntry *>* SymbolTable::m_used [private]


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

Generated on a sunny day for yast2-core by doxygen 1.5.9