#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 194 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 1031 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().
01032 { 01033 list<Klass* >::iterator k; 01034 01035 tab(n,fout); fout << "class " << fKlassName << " {"; 01036 01037 tab(n,fout); fout << " private:"; 01038 tab(n+1,fout); fout << "int \tfSamplingFreq;"; 01039 01040 for (k = fSubClassList.begin(); k != fSubClassList.end(); k++) (*k)->println(n+1, fout); 01041 01042 printlines(n+1, fDeclCode, fout); 01043 01044 tab(n,fout); fout << " public:"; 01045 01046 tab(n+1,fout); fout << "int getNumInputs() \t{ " 01047 << "return " << fNumInputs << "; }"; 01048 tab(n+1,fout); fout << "int getNumOutputs() \t{ " 01049 << "return " << fNumOutputs << "; }"; 01050 01051 tab(n+1,fout); fout << "void init(int samplingFreq) {"; 01052 tab(n+2,fout); fout << "fSamplingFreq = samplingFreq;"; 01053 tab(n+1,fout); fout << "}"; 01054 01055 tab(n+1,fout); fout << "void fill (int count, int output[]) {"; 01056 printlines (n+2, fZone1Code, fout); 01057 printlines (n+2, fZone2Code, fout); 01058 printlines (n+2, fZone2bCode, fout); 01059 printlines (n+2, fZone3Code, fout); 01060 printLoopGraphInternal (n+2,fout); 01061 tab(n+1,fout); fout << "}"; 01062 01063 tab(n,fout); fout << "};\n" << endl; 01064 }