Changeset 17 for trunk/tmdmcreator/src/tmdmprocessor.cpp
- Timestamp:
- 02/21/13 17:14:39 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tmdmcreator/src/tmdmprocessor.cpp
r16 r17 18 18 #include "tmdmcopier.h" 19 19 20 TmDmProcessor::TmDmProcessor() { 20 TmDmProcessor::TmDmProcessor(const wxFileName & src, const wxFileName & dest) { 21 m_FileSrc = src; 22 m_FileDst = dest; 21 23 } 22 24 … … 29 31 30 32 int TmDmProcessor::FindBlock(const wxString & blockname) { 33 wxFileInputStream input(m_FileSrc.GetFullPath()); 34 wxTextInputStream text(input); 35 long myLineIndex = 0; 36 while(input.IsOk() && !input.Eof() ){ 37 wxString myLine = text.ReadLine(); 38 if (myLine.StartsWith(blockname)==true){ 39 return myLineIndex; 40 } 41 myLineIndex++; 42 } 31 43 return wxNOT_FOUND; 32 44 } … … 39 51 40 52 41 TmDmProcessorSimple::TmDmProcessorSimple( ) {53 TmDmProcessorSimple::TmDmProcessorSimple(const wxFileName & src, const wxFileName & dest) : TmDmProcessor(src,dest) { 42 54 } 43 55 … … 49 61 50 62 51 bool TmDmProcessorSimple::ProcessBlock(int blockstart, TmDmCopier * copier) { 63 bool TmDmProcessorSimple::ProcessBlock(int blockstart) { 64 wxString mySQLCols = wxEmptyString; 65 wxString mySQLTxt = wxEmptyString; 66 67 wxFileInputStream input(m_FileSrc.GetFullPath()); 68 wxTextInputStream text(input); 69 long myLineIndex = 0; 70 while(input.IsOk() && !input.Eof() ){ 71 if (myLineIndex <= blockstart) { 72 myLineIndex++; 73 continue; 74 } 75 76 wxString myRow = text.ReadLine(); 77 78 // HERE !!! 79 80 81 82 myLineIndex++; 83 } 84 return wxNOT_FOUND; 85 86 87 88 52 89 return false; 53 90 } … … 61 98 62 99 63 TmDmProcessorAttributs::TmDmProcessorAttributs( ) {100 TmDmProcessorAttributs::TmDmProcessorAttributs(const wxFileName & src, const wxFileName & dest) : TmDmProcessor(src,dest) { 64 101 } 65 102 … … 67 104 } 68 105 69 bool TmDmProcessorAttributs::ProcessBlock(int blockstart , TmDmCopier * copier) {106 bool TmDmProcessorAttributs::ProcessBlock(int blockstart) { 70 107 return false; 71 108 }
Note: See TracChangeset
for help on using the changeset viewer.