00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _LATEQ_H
00025 #define _LATEQ_H
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 using namespace std;
00049
00050 #include <string>
00051 #include <list>
00052 #include <map>
00053
00054
00055 class Lateq {
00056
00057 public:
00058
00059 Lateq (const int& numInputs, const int& numOutputs)
00060 : fNumInputs(numInputs), fNumOutputs(numOutputs)
00061 {}
00062
00063 ~Lateq() {}
00064
00066 void addInputSigFormula (const string& str) { fInputSigsFormulas.push_back(str); }
00067 void addConstSigFormula (const string& str) { fConstSigsFormulas.push_back(str); }
00068 void addParamSigFormula (const string& str) { fParamSigsFormulas.push_back(str); }
00069 void addStoreSigFormula (const string& str) { fStoreSigsFormulas.push_back(str); }
00070 void addRecurSigFormula (const string& str) { fRecurSigsFormulas.push_back(str); }
00071 void addRDTblSigFormula (const string& str) { fRDTblSigsFormulas.push_back(str); }
00072 void addRWTblSigFormula (const string& str) { fRWTblSigsFormulas.push_back(str); }
00073 void addSelectSigFormula (const string& str) { fSelectSigsFormulas.push_back(str); }
00074 void addPrefixSigFormula (const string& str) { fPrefixSigsFormulas.push_back(str); }
00075 void addOutputSigFormula (const string& str) { fOutputSigsFormulas.push_back(str); }
00076 void addUISigFormula (const string& path, const string& str) { fUISigsFormulas.insert(make_pair(path, str)); };
00077
00079 void println(ostream& docout);
00080
00081 int inputs() const { return fNumInputs; }
00082 int outputs() const { return fNumOutputs; }
00083
00084
00085 private:
00086
00087 const int fNumInputs;
00088 const int fNumOutputs;
00089
00091 list<string> fInputSigsFormulas;
00092 list<string> fConstSigsFormulas;
00093 list<string> fParamSigsFormulas;
00094 list<string> fStoreSigsFormulas;
00095 list<string> fRecurSigsFormulas;
00096 list<string> fRDTblSigsFormulas;
00097 list<string> fRWTblSigsFormulas;
00098 list<string> fSelectSigsFormulas;
00099 list<string> fPrefixSigsFormulas;
00100 list<string> fOutputSigsFormulas;
00101 multimap<string,string> fUISigsFormulas;
00102
00103 void printOneLine (const string& section, list<string>& field, ostream& docout);
00104 void printHierarchy (const string& section, multimap<string,string>& field, ostream& docout);
00105 void printDGroup (const string& section, list<string>& field, ostream& docout);
00106 void printMath (const string& section, list<string>& field, ostream& docout);
00107
00108 bool hasNotOnlyEmptyKeys(multimap<string,string>& mm);
00109 void tab(int n, ostream& docout) const;
00110 };
00111
00112 void initDocMath();
00113
00114
00115 #endif