Ignore:
Timestamp:
02/21/13 17:14:39 (11 years ago)
Author:
lucsch
Message:

Preliminary code for processing user_content.txt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tmdmcreator/src/tmdmcreator.cpp

    r16 r17  
    1717#include "tmdmcreator.h" 
    1818#include "tmdmcopier.h" 
     19#include "tmdmprocessor.h" 
    1920 
    2021TmDmCreator::TmDmCreator() { 
     
    9293bool TmDmCreator::ProcessFiles(wxArrayString & errorsmsg) { 
    9394    errorsmsg.Clear(); 
    94     // Copy structure to out 
     95    // Copy structure 
    9596    TmDmCopier myCopier(m_FileNameOutSQL); 
    9697    if (myCopier.CopyFrom(m_FileNameBaseSQL) == false) { 
     
    104105    } 
    105106     
    106      
    107      
     107    // Process layers 
     108    TmDmProcessorSimple myLayerProc(m_FileNameUserContent, m_FileNameOutSQL); 
     109    int myThematicLayersStart = myLayerProc.FindBlock(_T("thematic_layers")); 
     110    if (myThematicLayersStart == wxNOT_FOUND) { 
     111        errorsmsg.Add(wxString::Format(_("'thematic_layers' field not found in %s"), m_FileNameUserContent.GetFullPath())); 
     112        return false; 
     113    } 
     114    if (myLayerProc.ProcessBlock(myThematicLayersStart)==false) { 
     115        errorsmsg.Add(wxString::Format(_("Processing 'thematic_layers' failed in %s"), m_FileNameUserContent.GetFullPath())); 
     116        return false; 
     117    } 
    108118    return true; 
    109119} 
Note: See TracChangeset for help on using the changeset viewer.