From 3563c6dfd0f5f102cb748ecc6ad318601990515e Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 14 May 2009 18:21:15 +0200 Subject: adding doxygen docs --- ue3/doxygen/classCInstruction.html | 575 +++++++++++++++++++++++++++++++++++++ 1 file changed, 575 insertions(+) create mode 100644 ue3/doxygen/classCInstruction.html (limited to 'ue3/doxygen/classCInstruction.html') diff --git a/ue3/doxygen/classCInstruction.html b/ue3/doxygen/classCInstruction.html new file mode 100644 index 0000000..052da01 --- /dev/null +++ b/ue3/doxygen/classCInstruction.html @@ -0,0 +1,575 @@ + + +mycpu: CInstruction Class Reference + + + + +
+ +
+
+ +
+

CInstruction Class Reference

#include <cinstruction.h> +

+

+Inheritance diagram for CInstruction:
+
+ +

+ +CInstructionAdd +CInstructionDec +CInstructionDiv +CInstructionInc +CInstructionJumpA +CInstructionJumpS +CInstructionJumpZ +CInstructionLabel +CInstructionLoad +CInstructionMul +CInstructionStore +CInstructionSub +CInstructionTest +CInstructionWrite + +
+ +

+List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 CInstruction (std::string name)
 Default ctor.
virtual ~CInstruction ()
 Default dtor.
virtual bool operator== (std::string &name)
 implementation of operator ==
virtual CInstructionoperator() (CCPU *cpu)
 implementation of operator (CCPU)
virtual const
+std::string & 
getName ()
 returns instruction name
virtual std::ostream & dump (std::ostream &stream)
 dumps information about instruction to outputstream
virtual const unsigned parseRegister (const std::string &str)
 parses register syntax Rx (e.g. "R1")
virtual void checkRegister (CCPU *cpu, const unsigned regidx)
 performs a register boundary check does the register exist in cpu?
virtual CInstructionfactory ()=0
 creates a new instance of this instruction
virtual void compile (std::list< std::string > &params)=0
 parses instruction parameters and prepares the instruction for executing
virtual void execute (CCPU *cpu)=0
 executes the instruction

Protected Attributes

std::string m_name

Friends

std::ostream & operator<< (std::ostream &stream, CInstruction &instr)
 Shift/output operator for outputstream.
+


Detailed Description

+Abstract class for displays

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + +
CInstruction::CInstruction (std::string  name  )  [inline]
+
+
+ +

+Default ctor. +

+

Methodname:
CInstruction
+
Parameters:
+ + +
name name of instruction
+
+
Returns:
-
+
Global variables used:
none
+
Exceptions:
+ + +
none 
+
+
Conditions:
none
+ +
+

+ +

+
+ + + + + + + + +
virtual CInstruction::~CInstruction (  )  [inline, virtual]
+
+
+ +

+Default dtor. +

+

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

+


Member Function Documentation

+ +
+
+ + + + + + + + + +
virtual bool CInstruction::operator== (std::string &  name  )  [inline, virtual]
+
+
+ +

+implementation of operator == +

+

Methodname:
operator==
+
Parameters:
+ + +
name reference to std::string
+
+
Returns:
true if instructionname is name
+
Global variables used:
none
+
Exceptions:
+ + +
none 
+
+
Conditions:
none
+ +
+

+ +

+
+ + + + + + + + + +
virtual CInstruction& CInstruction::operator() (CCPU cpu  )  [inline, virtual]
+
+
+ +

+implementation of operator (CCPU) +

+

Methodname:
operator()
+
Parameters:
+ + +
cpu pointer to cpu
+
+
Returns:
-
+
Global variables used:
none
+
Exceptions:
+ + +
std::runtime_error 
+
+
Conditions:
none
+ +
+

+ +

+
+ + + + + + + + +
virtual const std::string& CInstruction::getName (  )  [inline, virtual]
+
+
+ +

+returns instruction name +

+

Methodname:
getName
+
Parameters:
+ + +
- 
+
+
Returns:
name of instruction
+
Global variables used:
none
+
Exceptions:
+ + +
none 
+
+
Conditions:
none
+ +
+

+ +

+
+ + + + + + + + + +
virtual std::ostream& CInstruction::dump (std::ostream &  stream  )  [inline, virtual]
+
+
+ +

+dumps information about instruction to outputstream +

+

Methodname:
dump
+
Parameters:
+ + +
stream outputstream
+
+
Returns:
reference to outputstream
+
Global variables used:
none
+
Exceptions:
+ + +
none 
+
+
Conditions:
none
+ +
+

+ +

+
+ + + + + + + + + +
const unsigned CInstruction::parseRegister (const std::string &  str  )  [virtual]
+
+
+ +

+parses register syntax Rx (e.g. "R1") +

+

Methodname:
parseRegister
+
Parameters:
+ + +
str register in assembler syntax
+
+
Returns:
registernumber
+
Global variables used:
none
+
Exceptions:
+ + +
std::runtime_error 
+
+
Conditions:
none
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void CInstruction::checkRegister (CCPU cpu,
const unsigned  regidx 
) [inline, virtual]
+
+
+ +

+performs a register boundary check does the register exist in cpu? +

+

Methodname:
checkRegister
+
Parameters:
+ + + +
cpu pointer to cpu
regidx registernumber
+
+
Returns:
-
+
Global variables used:
none
+
Exceptions:
+ + +
std::runtime_error 
+
+
Conditions:
none
+ +
+

+ +

+
+ + + + + + + + +
virtual CInstruction* CInstruction::factory (  )  [pure virtual]
+
+
+ +

+creates a new instance of this instruction +

+

Methodname:
factory
+
Parameters:
+ + +
- 
+
+
Returns:
new instruction instance
+
Global variables used:
none
+
Exceptions:
+ + +
none 
+
+
Conditions:
none
+ +

Implemented in CInstructionInc, CInstructionDec, CInstructionAdd, CInstructionSub, CInstructionMul, CInstructionDiv, CInstructionLoad, CInstructionStore, CInstructionTest, CInstructionLabel, CInstructionJumpA, CInstructionJumpZ, CInstructionJumpS, and CInstructionWrite.

+ +
+

+ +

+
+ + + + + + + + + +
virtual void CInstruction::compile (std::list< std::string > &  params  )  [pure virtual]
+
+
+ +

+parses instruction parameters and prepares the instruction for executing +

+

Methodname:
compile
+
Parameters:
+ + +
params list of parameters of this instruction
+
+
Returns:
-
+
Global variables used:
none
+
Exceptions:
+ + +
std::runtime_error 
+
+
Conditions:
none
+ +

Implemented in CInstructionInc, CInstructionDec, CInstructionAdd, CInstructionSub, CInstructionMul, CInstructionDiv, CInstructionLoad, CInstructionStore, CInstructionTest, CInstructionLabel, CInstructionJumpA, CInstructionJumpZ, CInstructionJumpS, and CInstructionWrite.

+ +
+

+ +

+
+ + + + + + + + + +
virtual void CInstruction::execute (CCPU cpu  )  [pure virtual]
+
+
+ +

+executes the instruction +

+

Methodname:
execute
+
Parameters:
+ + +
cpu pointer to cpu
+
+
Returns:
-
+
Global variables used:
none
+
Exceptions:
+ + +
std::runtime_error 
+
+
Conditions:
none
+ +

Implemented in CInstructionInc, CInstructionDec, CInstructionAdd, CInstructionSub, CInstructionMul, CInstructionDiv, CInstructionLoad, CInstructionStore, CInstructionTest, CInstructionLabel, CInstructionJumpA, CInstructionJumpZ, CInstructionJumpS, and CInstructionWrite.

+ +
+

+


Friends And Related Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
std::ostream& operator<< (std::ostream &  stream,
CInstruction instr 
) [friend]
+
+
+ +

+Shift/output operator for outputstream. +

+

Methodname:
operator<<
+
Parameters:
+ + + +
stream reference to outputstream
instr object which will be printed to stream
+
+
Returns:
reference to outputstream
+
Global variables used:
none
+
Exceptions:
+ + +
none 
+
+
Conditions:
none
+ +
+

+


Member Data Documentation

+ +
+
+ + + + +
std::string CInstruction::m_name [protected]
+
+
+ +

+name of instruction +

+

+


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
+ + -- cgit v1.2.3