Pol  Revision:4b29d2b
Pol::Bscript::SymbolContainer Class Reference

#include <symcont.h>

+ Inheritance diagram for Pol::Bscript::SymbolContainer:

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 46 of file symcont.h.

Constructor & Destructor Documentation

Pol::Bscript::SymbolContainer::SymbolContainer ( int  growBy = 512)
explicit

Definition at line 22 of file symcont.cpp.

References allocLen, growBy, s, and usedLen.

Pol::Bscript::SymbolContainer::~SymbolContainer ( )
virtual

Definition at line 28 of file symcont.cpp.

References s.

Member Function Documentation

void Pol::Bscript::SymbolContainer::append ( const char *  string,
unsigned &  position 
)

Definition at line 80 of file symcont.cpp.

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

Referenced by Pol::Bscript::EScriptProgram::addToken().

void Pol::Bscript::SymbolContainer::append ( int  lvalue,
unsigned &  position 
)

Definition at line 91 of file symcont.cpp.

References resize(), s, and usedLen.

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

Definition at line 99 of file symcont.cpp.

References resize(), s, and usedLen.

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

Definition at line 107 of file symcont.cpp.

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

const char* Pol::Bscript::SymbolContainer::array ( void  ) const
inline

Definition at line 69 of file symcont.h.

Referenced by Pol::Bscript::EScriptProgram::_readToken().

virtual void* Pol::Bscript::SymbolContainer::detach ( void  )
inlinevirtual

Reimplemented in Pol::Bscript::StoredTokenContainer.

Definition at line 70 of file symcont.h.

Referenced by Pol::Bscript::StoredTokenContainer::detach().

void Pol::Bscript::SymbolContainer::erase ( )

Definition at line 35 of file symcont.cpp.

References allocLen, s, and usedLen.

Referenced by Pol::Bscript::EScriptProgram::erase().

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

Definition at line 65 of file symcont.cpp.

References s, and usedLen.

Referenced by append().

unsigned int Pol::Bscript::SymbolContainer::get_write_length ( ) const

Definition at line 125 of file symcont.cpp.

References usedLen.

Referenced by Pol::Bscript::EScriptProgram::write().

unsigned Pol::Bscript::SymbolContainer::length ( void  ) const
inline
virtual void Pol::Bscript::SymbolContainer::pack ( void  )
inlinevirtual

Reimplemented in Pol::Bscript::StoredTokenContainer.

Definition at line 57 of file symcont.h.

References data.

Referenced by Pol::Bscript::StoredTokenContainer::pack().

void Pol::Bscript::SymbolContainer::read ( FILE *  fp)
virtual
void Pol::Bscript::SymbolContainer::read ( char *  fname)
virtual

Definition at line 161 of file symcont.cpp.

References read().

void Pol::Bscript::SymbolContainer::resize ( unsigned  lengthToAdd)
virtual
void Pol::Bscript::SymbolContainer::setlength ( unsigned  newLen)
inline

Definition at line 68 of file symcont.h.

Referenced by Pol::Bscript::Compiler::rollback().

void Pol::Bscript::SymbolContainer::write ( FILE *  fp)
virtual

Definition at line 117 of file symcont.cpp.

References s, and usedLen.

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

void Pol::Bscript::SymbolContainer::write ( char *  fname)
virtual

Definition at line 131 of file symcont.cpp.

References write().

Member Data Documentation

unsigned Pol::Bscript::SymbolContainer::allocLen
protected

Definition at line 51 of file symcont.h.

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

unsigned Pol::Bscript::SymbolContainer::growBy
protected

Definition at line 52 of file symcont.h.

Referenced by resize(), and SymbolContainer().

unsigned Pol::Bscript::SymbolContainer::usedLen
protected

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