#include <klass.hh>
Inherits Klass.
Public Member Functions | |
SigIntGenKlass (const string &name) | |
virtual void | println (int n, ostream &fout) |
Print an auxillary C++ class corresponding to an integer init signal. |
Definition at line 203 of file klass.hh.
SigIntGenKlass::SigIntGenKlass | ( | const string & | name | ) | [inline] |
void SigIntGenKlass::println | ( | int | n, | |
ostream & | fout | |||
) | [virtual] |
Print an auxillary C++ class corresponding to an integer init signal.
Reimplemented from Klass.
Definition at line 1105 of file klass.cpp.
References Klass::fDeclCode, Klass::fKlassName, Klass::fNumInputs, Klass::fNumOutputs, Klass::fSubClassList, Klass::fZone1Code, Klass::fZone2bCode, Klass::fZone2Code, Klass::fZone3Code, printlines(), Klass::printLoopGraphInternal(), and tab().
01106 { 01107 list<Klass* >::iterator k; 01108 01109 tab(n,fout); fout << "class " << fKlassName << " {"; 01110 01111 tab(n,fout); fout << " private:"; 01112 tab(n+1,fout); fout << "int \tfSamplingFreq;"; 01113 01114 for (k = fSubClassList.begin(); k != fSubClassList.end(); k++) (*k)->println(n+1, fout); 01115 01116 printlines(n+1, fDeclCode, fout); 01117 01118 tab(n,fout); fout << " public:"; 01119 01120 tab(n+1,fout); fout << "int getNumInputs() \t{ " 01121 << "return " << fNumInputs << "; }"; 01122 tab(n+1,fout); fout << "int getNumOutputs() \t{ " 01123 << "return " << fNumOutputs << "; }"; 01124 01125 tab(n+1,fout); fout << "void init(int samplingFreq) {"; 01126 tab(n+2,fout); fout << "fSamplingFreq = samplingFreq;"; 01127 tab(n+1,fout); fout << "}"; 01128 01129 tab(n+1,fout); fout << "void fill (int count, int output[]) {"; 01130 printlines (n+2, fZone1Code, fout); 01131 printlines (n+2, fZone2Code, fout); 01132 printlines (n+2, fZone2bCode, fout); 01133 printlines (n+2, fZone3Code, fout); 01134 printLoopGraphInternal (n+2,fout); 01135 tab(n+1,fout); fout << "}"; 01136 01137 tab(n,fout); fout << "};\n" << endl; 01138 }