summaryrefslogtreecommitdiffstats
path: root/ue4/mycpu/cprogram.h
diff options
context:
space:
mode:
Diffstat (limited to 'ue4/mycpu/cprogram.h')
-rw-r--r--ue4/mycpu/cprogram.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/ue4/mycpu/cprogram.h b/ue4/mycpu/cprogram.h
index 43193ac..d8f7d5e 100644
--- a/ue4/mycpu/cprogram.h
+++ b/ue4/mycpu/cprogram.h
@@ -21,7 +21,7 @@
21#include "instructions.h" 21#include "instructions.h"
22 22
23/* forward declare CInstruction */ 23/* forward declare CInstruction */
24template <class T> 24template<class T=CDat<int>, int width=0>
25class CInstruction; 25class CInstruction;
26 26
27/** 27/**
@@ -30,7 +30,7 @@ class CInstruction;
30 * CProgram extends std::vector and adds a method for parsing 30 * CProgram extends std::vector and adds a method for parsing
31 * programfile. This adds instances of CInstruction to CProgram itself. 31 * programfile. This adds instances of CInstruction to CProgram itself.
32 */ 32 */
33template <class T> 33template<class T=CDat<int>, int width=0>
34class CProgram 34class CProgram
35 : public std::vector<CInstruction<T> *> 35 : public std::vector<CInstruction<T> *>
36{ 36{
@@ -122,7 +122,7 @@ class CProgram
122 122
123/*----------------------------------------------------------------------------*/ 123/*----------------------------------------------------------------------------*/
124 124
125template <class T> 125template<class T=CDat<int>, int width=0>
126CProgram<T>::CProgram() 126CProgram<T>::CProgram()
127{ 127{
128 m_instrset.insert(new CInstructionInc<T>); 128 m_instrset.insert(new CInstructionInc<T>);
@@ -143,7 +143,7 @@ CProgram<T>::CProgram()
143 143
144/*----------------------------------------------------------------------------*/ 144/*----------------------------------------------------------------------------*/
145 145
146template <class T> 146template<class T=CDat<int>, int width=0>
147CProgram<T>::~CProgram() 147CProgram<T>::~CProgram()
148{ 148{
149 /* free instruction set */ 149 /* free instruction set */
@@ -157,7 +157,7 @@ CProgram<T>::~CProgram()
157 157
158/*----------------------------------------------------------------------------*/ 158/*----------------------------------------------------------------------------*/
159 159
160template <class T> 160template<class T=CDat<int>, int width=0>
161void CProgram<T>::compile(std::istream& in) 161void CProgram<T>::compile(std::istream& in)
162{ 162{
163 if (!in.good()) 163 if (!in.good())
@@ -241,7 +241,7 @@ void CProgram<T>::compile(std::istream& in)
241 241
242/*----------------------------------------------------------------------------*/ 242/*----------------------------------------------------------------------------*/
243 243
244template <class T> 244template<class T=CDat<int>, int width=0>
245unsigned CProgram<T>::findLabel(const std::string& label) const 245unsigned CProgram<T>::findLabel(const std::string& label) const
246{ 246{
247 std::map<std::string, unsigned>::const_iterator it; 247 std::map<std::string, unsigned>::const_iterator it;
@@ -254,7 +254,7 @@ unsigned CProgram<T>::findLabel(const std::string& label) const
254/*----------------------------------------------------------------------------*/ 254/*----------------------------------------------------------------------------*/
255 255
256#if DEBUG 256#if DEBUG
257template <class T> 257template<class T=CDat<int>, int width=0>
258void CProgram<T>::dump(std::ostream& out) 258void CProgram<T>::dump(std::ostream& out)
259{ 259{
260 out << "[PROGRAM DUMP]" << std::endl; 260 out << "[PROGRAM DUMP]" << std::endl;