equal
deleted
inserted
replaced
20 #include "MLCompDataLayPerfWriter.h" |
20 #include "MLCompDataLayPerfWriter.h" |
21 #include "MLCompData2Cdl.h" // for static methods |
21 #include "MLCompData2Cdl.h" // for static methods |
22 #include "LayoutCompilerErr.h" |
22 #include "LayoutCompilerErr.h" |
23 #include "CodeGenConsts.h" |
23 #include "CodeGenConsts.h" |
24 |
24 |
25 #include <cdlcompilertoolkit/cdltkinterface.h> |
25 #include <CdlCompilerToolkit/CdlTkInterface.h> |
26 #include <cdlcompilertoolkit/cdltkutil.h> |
26 #include <CdlCompilerToolkit/CdlTkUtil.h> |
27 |
27 |
28 #include <iostream> |
28 #include <iostream> |
29 #include <sstream> |
29 #include <sstream> |
30 #include <set> |
30 #include <set> |
31 #include <fstream> |
31 #include <fstream> |
86 out << "DECLARE_LOCAL_VARS_COUNTS" << endl; |
86 out << "DECLARE_LOCAL_VARS_COUNTS" << endl; |
87 |
87 |
88 out << "\n// Layout MACROs for Layout Table : "; |
88 out << "\n// Layout MACROs for Layout Table : "; |
89 out << iTable.Name() << endl; |
89 out << iTable.Name() << endl; |
90 |
90 |
91 for (int i=0; i<iTable.size(); ++i) |
91 for (unsigned int i=0; i<iTable.size(); ++i) |
92 { |
92 { |
93 WriteLine(out, *iTable[i]); |
93 WriteLine(out, *iTable[i]); |
94 } |
94 } |
95 |
95 |
96 out << endl; |
96 out << endl; |
185 // TMLCompDataLayPerfWriter |
185 // TMLCompDataLayPerfWriter |
186 // |
186 // |
187 |
187 |
188 TMLCompDataLayPerfWriter::TMLCompDataLayPerfWriter(CCdlTkInterface& aInterface, TMLCompData& aLayout, const std::string& aName) |
188 TMLCompDataLayPerfWriter::TMLCompDataLayPerfWriter(CCdlTkInterface& aInterface, TMLCompData& aLayout, const std::string& aName) |
189 : |
189 : |
190 iInterface(aInterface), |
190 TMLWriterBase<TMLCompData>(aLayout, aName), |
191 TMLWriterBase<TMLCompData>(aLayout, aName) |
191 iInterface(aInterface) |
192 { |
192 { |
193 } |
193 } |
194 |
194 |
195 void TMLCompDataLayPerfWriter::Write(const std::string& aCdlName) |
195 void TMLCompDataLayPerfWriter::Write(const std::string& aCdlName) |
196 { |
196 { |
199 cout << "writing layout " << iName << endl; |
199 cout << "writing layout " << iName << endl; |
200 string cdlFileName(CdlTkUtil::StripPath(aCdlName)); |
200 string cdlFileName(CdlTkUtil::StripPath(aCdlName)); |
201 string ifName(iInterface.Header().Name()); |
201 string ifName(iInterface.Header().Name()); |
202 |
202 |
203 out << "// function implementations: " << endl; |
203 out << "// function implementations: " << endl; |
204 int tableId = 0; |
204 unsigned int tableId = 0; |
205 for (TMLCompData::iterator pTab = iLayout.begin(); pTab != iLayout.end(); ++pTab) |
205 for (TMLCompData::iterator pTab = iLayout.begin(); pTab != iLayout.end(); ++pTab) |
206 { |
206 { |
207 TMLCompDataLayPerfTableWriter writer(this, **pTab, ifName, tableId++); |
207 TMLCompDataLayPerfTableWriter writer(this, **pTab, ifName, tableId++); |
208 writer.Write(out); |
208 writer.Write(out); |
209 } |
209 } |