Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

VM::ProgramStorage Class Reference

Represents program storage. More...

#include <program.h>

Collaboration diagram for VM::ProgramStorage:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ProgramStorage ()
 Create empty program storage.

 ~ProgramStorage ()
 Destructor will free all stored function (program) storage.

FunctionFirstFunction ()
 Get pointer to first function in list (if you want to iterate).

void AddFunction (Function *f)
 Add a function to the storage.


Private Member Functions

 ProgramStorage (const ProgramStorage &)
 Do not use.

void operator= (const ProgramStorage &)
 Do not use.


Private Attributes

LinkedList< Functionflist
 List of all functions we have.


Detailed Description

Represents program storage.

Author:
Wolfgang Wieser ] wwieser (a) gmx <*> de [
Program storage, either for complete program or for the program section in a file.

The program storage is organized in function programs, i.e. the complete program for the VM is just a set of function programs.

This class is NOT C++-safe.

Definition at line 48 of file program.h.


Constructor & Destructor Documentation

VM::ProgramStorage::ProgramStorage const ProgramStorage  )  [private]
 

Do not use.

VM::ProgramStorage::ProgramStorage  ) 
 

Create empty program storage.

Definition at line 46 of file program.cc.

VM::ProgramStorage::~ProgramStorage  ) 
 

Destructor will free all stored function (program) storage.

Definition at line 51 of file program.cc.

References flist, LinkedList< Function >::IsEmpty(), and LinkedList< Function >::PopFirst().


Member Function Documentation

void VM::ProgramStorage::AddFunction Function f  ) 
 

Add a function to the storage.

NOTE: You must allocate the Function using operator new. The Function object is then taken over by the ProgramStorage which will eventually free it.

Definition at line 40 of file program.cc.

References LinkedList< Function >::append(), and flist.

Referenced by VM::VMLinker::_CreateInitFunction(), VM::VMLinker::_LinkFunction(), and VM::AssemblerFile_Plaintext::_ParseProgram_FinishFunction().

Function* VM::ProgramStorage::FirstFunction  )  [inline]
 

Get pointer to first function in list (if you want to iterate).

Definition at line 115 of file program.h.

References LinkedList< Function >::first(), and flist.

Referenced by VM::VMLinker::_GenerateSymbolProvideMap(), VM::AssemblerFile::ResolveIDsNamespaceLocal(), and VM::AssemblerFile_Plaintext::WriteFile().

void VM::ProgramStorage::operator= const ProgramStorage  )  [private]
 

Do not use.


Member Data Documentation

LinkedList<Function> VM::ProgramStorage::flist [private]
 

List of all functions we have.

Definition at line 101 of file program.h.

Referenced by AddFunction(), FirstFunction(), and ~ProgramStorage().


The documentation for this class was generated from the following files:
Generated on Sat Feb 19 22:36:19 2005 for Ray by doxygen 1.3.5