CProgram Class 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

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

Constructor & Destructor Documentation

CProgram::CProgram (  ) 

Default ctor.

Methodname:
CProgram
Parameters:
- 
Returns:
-
Global variables used:
none
Exceptions:
none 
Conditions:
none

CProgram::~CProgram (  ) 

Default dtor.

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


Member Function Documentation

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

get reference to labels map

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

unsigned CProgram::findLabel ( const std::string &  label  )  const

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:
std::runtime_error 
Conditions:
none

void CProgram::compile ( std::istream &  in  ) 

create instructions from parsing stream

Methodname:
compile
Parameters:
in inputstream to read from
Returns:
void
Global variables used:
none
Exceptions:
std::runtime_error 
Conditions:
none


The documentation for this class was generated from the following files:
Generated on Thu May 14 18:19:17 2009 for mycpu by  doxygen 1.5.3