Pol  Rev 533
SymbolContainer Class Reference

#include <symcont.h>

+ Inheritance diagram for SymbolContainer:

List of all members.

Public Member Functions

 SymbolContainer (int growBy=512)
virtual ~SymbolContainer ()
void append (const char *string, unsigned &position)
void append (int lvalue, unsigned &position)
void append (double dvalue, unsigned &position)
void append (void *data, unsigned datalen, unsigned &position)
const char * array (void) const
virtual void * detach (void)
void erase ()
bool findexisting (const void *data, int datalen, unsigned &position)
unsigned int get_write_length () const
unsigned length (void) const
virtual void pack (void)
virtual void read (FILE *fp)
virtual void read (char *fname)
virtual void resize (unsigned lengthToAdd)
void setlength (unsigned newLen)
virtual void write (FILE *fp)
virtual void write (char *fname)

Protected Attributes

unsigned allocLen
unsigned growBy
char * s
unsigned usedLen

Detailed Description

Definition at line 47 of file symcont.h.


Constructor & Destructor Documentation

SymbolContainer::SymbolContainer ( int  growBy = 512) [explicit]

Definition at line 22 of file symcont.cpp.

References allocLen, growBy, s, and usedLen.

Definition at line 28 of file symcont.cpp.

References s.


Member Function Documentation

void SymbolContainer::append ( const char *  string,
unsigned &  position 
)
void SymbolContainer::append ( int  lvalue,
unsigned &  position 
)

Definition at line 88 of file symcont.cpp.

References resize(), s, and usedLen.

+ Here is the call graph for this function:

void SymbolContainer::append ( double  dvalue,
unsigned &  position 
)

Definition at line 96 of file symcont.cpp.

References resize(), s, and usedLen.

+ Here is the call graph for this function:

void SymbolContainer::append ( void *  data,
unsigned  datalen,
unsigned &  position 
)

Definition at line 104 of file symcont.cpp.

References findexisting(), resize(), s, and usedLen.

+ Here is the call graph for this function:

const char* SymbolContainer::array ( void  ) const [inline]

Definition at line 69 of file symcont.h.

References s.

Referenced by EScriptProgram::_readToken().

+ Here is the caller graph for this function:

virtual void* SymbolContainer::detach ( void  ) [inline, virtual]

Reimplemented in StoredTokenContainer.

Definition at line 70 of file symcont.h.

References allocLen, s, and usedLen.

Definition at line 34 of file symcont.cpp.

References allocLen, s, and usedLen.

Referenced by EScriptProgram::erase().

+ Here is the caller graph for this function:

bool SymbolContainer::findexisting ( const void *  data,
int  datalen,
unsigned &  position 
)

Definition at line 62 of file symcont.cpp.

References s, and usedLen.

Referenced by append().

+ Here is the caller graph for this function:

unsigned int SymbolContainer::get_write_length ( ) const

Definition at line 122 of file symcont.cpp.

References usedLen.

Referenced by EScriptProgram::write().

+ Here is the caller graph for this function:

unsigned SymbolContainer::length ( void  ) const [inline]

Definition at line 67 of file symcont.h.

References usedLen.

Referenced by EScriptProgram::_readToken(), EScriptProgramCheckpoint::commit(), EScriptProgram::create_instructions(), EScriptProgram::dump(), and StoredTokenContainer::next().

+ Here is the caller graph for this function:

virtual void SymbolContainer::pack ( void  ) [inline, virtual]

Reimplemented in StoredTokenContainer.

Definition at line 57 of file symcont.h.

void SymbolContainer::read ( FILE *  fp) [virtual]

Reimplemented in StoredTokenContainer.

Definition at line 136 of file symcont.cpp.

References allocLen, s, and usedLen.

Referenced by read(), and EScriptProgram::read().

+ Here is the caller graph for this function:

void SymbolContainer::read ( char *  fname) [virtual]

Definition at line 156 of file symcont.cpp.

References read().

+ Here is the call graph for this function:

void SymbolContainer::resize ( unsigned  lengthToAdd) [virtual]

Reimplemented in StoredTokenContainer.

Definition at line 41 of file symcont.cpp.

References allocLen, decint(), growBy, s, and usedLen.

Referenced by append().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void SymbolContainer::setlength ( unsigned  newLen) [inline]

Definition at line 68 of file symcont.h.

References usedLen.

Referenced by Compiler::rollback().

+ Here is the caller graph for this function:

void SymbolContainer::write ( FILE *  fp) [virtual]

Definition at line 114 of file symcont.cpp.

References s, and usedLen.

Referenced by write(), and EScriptProgram::write().

+ Here is the caller graph for this function:

void SymbolContainer::write ( char *  fname) [virtual]

Definition at line 128 of file symcont.cpp.

References write().

+ Here is the call graph for this function:


Member Data Documentation

unsigned SymbolContainer::allocLen [protected]

Definition at line 52 of file symcont.h.

Referenced by detach(), erase(), read(), resize(), and SymbolContainer().

unsigned SymbolContainer::growBy [protected]

Definition at line 53 of file symcont.h.

Referenced by resize(), and SymbolContainer().


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