aknlayoutcompiler/src/CppWriter.cpp
changeset 1 b700e12870ca
parent 0 f58d6ec98e88
child 44 8b4f687b7a95
equal deleted inserted replaced
0:f58d6ec98e88 1:b700e12870ca
    16 *
    16 *
    17 */
    17 */
    18 
    18 
    19 
    19 
    20 #include "CppWriter.h"
    20 #include "CppWriter.h"
    21 #include "layoutcompilererr.h"
    21 #include "LayoutCompilerErr.h"
    22 #include "CodeGenConsts.h"
    22 #include "CodeGenConsts.h"
    23 #include "UsefulDefinitions.h"
    23 #include "UsefulDefinitions.h"
    24 
    24 
    25 #include <cdlcompilertoolkit/cdltkutil.h>
    25 #include <CdlCompilerToolkit/CdlTkUtil.h>
    26 
    26 
    27 #include <fstream>
    27 #include <fstream>
    28 #include <algorithm>
    28 #include <algorithm>
    29 #include <iostream> // !!! for debug output only
    29 #include <iostream> // !!! for debug output only
    30 
    30 
   612 	iName = iName.substr(0, iName.find_first_of('.')) + lay;
   612 	iName = iName.substr(0, iName.find_first_of('.')) + lay;
   613 
   613 
   614 	BuildLayoutLineTable();
   614 	BuildLayoutLineTable();
   615 	CCdlTkFileCleanup temp(iName+".lag");
   615 	CCdlTkFileCleanup temp(iName+".lag");
   616 	Output(iName+".cpp", iName+".lag", lay);
   616 	Output(iName+".cpp", iName+".lag", lay);
   617 	CdlTkUtil::ExportFile(temp, KDirEpocSysHeader+iShortName+".lag");
   617 	CdlTkUtil::ExportFile(temp, CdlTkUtil::CurrentDrive()+KDirEpocSysHeader+iShortName+".lag");
   618 	}
   618 	}
   619 
   619 
   620 void TCppWriter::Output(const string& aCpp, const string& aLag, const string& aLayName)
   620 void TCppWriter::Output(const string& aCpp, const string& aLag, const string& aLayName)
   621 	{
   621 	{
   622 	cout << "writing cpp " << aCpp << endl;
   622 	cout << "writing cpp " << aCpp << endl;