CProgram< T > Class Template Reference

#include <cprogram.h>

List of all members.

Public Member Functions

 CProgram ()
 Default ctor.
 ~CProgram ()
 Default dtor.
const std::map
< std::string,
unsigned > & 
getLabels () const
 get reference to labels map
unsigned findLabel (const std::string &label) const
 search for label
void compile (std::istream &in)
 create instructions from parsing stream


Detailed Description

template<class T>
class CProgram< T >

CProgram extends std::vector and adds a method for parsing programfile. This adds instances of CInstruction to CProgram itself.

Constructor & Destructor Documentation

template<class T>
CProgram< T >::CProgram (  )  [inline]

Default ctor.

Methodname:
CProgram
Parameters:
- 
Returns:
-
Global variables used:
none
Exceptions:
none 
Precondition:
none
Postcondition:
none

template<class T>
CProgram< T >::~CProgram (  )  [inline]

Default dtor.

Methodname:
~CProgram
Parameters:
- 
Returns:
-
Global variables used:
none
Exceptions:
none 
Precondition:
none
Postcondition:
none


Member Function Documentation

template<class T>
const std::map<std::string, unsigned>& CProgram< T >::getLabels (  )  const [inline]

get reference to labels map

Methodname:
getLabels
Parameters:
- 
Returns:
reference to labels map
Global variables used:
none
Exceptions:
none 
Precondition:
none
Postcondition:
none

template<class T>
unsigned CProgram< T >::findLabel ( const std::string &  label  )  const [inline]

search for label

Methodname:
findLabel
Parameters:
label name of label to search for
Returns:
index of found label in program
Global variables used:
none
Exceptions:
CProgramError 
Precondition:
none
Postcondition:
none

template<class T>
void CProgram< T >::compile ( std::istream &  in  )  [inline]

create instructions from parsing stream

Methodname:
compile
Parameters:
in inputstream to read from
Returns:
void
Global variables used:
none
Exceptions:
CProgramError 
Precondition:
none
Postcondition:
none


The documentation for this class was generated from the following file:
Generated on Sat May 30 16:32:35 2009 for mycpu by  doxygen 1.5.3