From 9d0b2d638db0f3d1f5b7ec46912c367adefbf91e Mon Sep 17 00:00:00 2001 From: manuel Date: Sat, 30 May 2009 16:32:27 +0200 Subject: final stuff --- ue4/mycpu/ccpu.h | 2 +- ue4/mycpu/cinstruction.h | 4 ++-- ue4/mycpu/mycpu.cpp | 14 +++++++++++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ue4/mycpu/ccpu.h b/ue4/mycpu/ccpu.h index f005b74..5056077 100644 --- a/ue4/mycpu/ccpu.h +++ b/ue4/mycpu/ccpu.h @@ -258,7 +258,7 @@ class CCPU * @return - * @globalvars none * @exception CCPUError - * @pre none + * @pre m_memory and m_program still exist * @post none */ void run(); diff --git a/ue4/mycpu/cinstruction.h b/ue4/mycpu/cinstruction.h index 85122b4..b90563a 100644 --- a/ue4/mycpu/cinstruction.h +++ b/ue4/mycpu/cinstruction.h @@ -166,7 +166,7 @@ class CInstruction * @return registernumber * @globalvars none * @exception CInstructionError - * @pre none + * @pre str != NULL * @post none */ virtual const unsigned parseRegister(const std::string& str); @@ -217,7 +217,7 @@ class CInstruction * @return - * @globalvars none * @exception CInstructionError - * @pre none + * @pre cpu valid (memory, program, registers valid) * @post none */ virtual void execute(CCPU *cpu) = 0; diff --git a/ue4/mycpu/mycpu.cpp b/ue4/mycpu/mycpu.cpp index aefe0cb..7f45d33 100644 --- a/ue4/mycpu/mycpu.cpp +++ b/ue4/mycpu/mycpu.cpp @@ -29,7 +29,19 @@ using namespace std; namespace po = boost::program_options; -/* TODO */ +/** + * @func cpu_run + * @brief template for executing cpu with different datatype + * @param me string to name of me + * @param vm po::variables_map + * @param registers number of registers + * @param datatype instance of datatype + * @return - + * @globalvars none + * @exception none + * @pre none + * @post none + */ template void cpu_run(string& me, po::variables_map& vm, unsigned registers, T& datatype) { -- cgit v1.2.3