Changeset 6 for trunk/tmdmcreator/src


Ignore:
Timestamp:
02/15/13 23:15:19 (12 years ago)
Author:
lucsch
Message:

preliminary code for tmdmcreator

File:
1 edited

Legend:

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

    r4 r6  
     1/*************************************************************************** 
     2 TmDmCreator 
     3 Create SQL code for ToolMap project 
     4 ------------------- 
     5 copyright            : (C) 2013 CREALP Lucien Schreiber 
     6 email                : lucien.schreiber at crealp dot vs dot ch 
     7 ***************************************************************************/ 
     8 
     9/*************************************************************************** 
     10 *                                                                         * 
     11 *   This program is free software; you can redistribute it and/or modify  * 
     12 *   it under the terms of the GNU General Public License as published by  * 
     13 *   the Free Software Foundation; either version 2 of the License, or     * 
     14 *   (at your option) any later version.                                   * 
     15 *                                                                         * 
     16 ***************************************************************************/ 
    117#include "wx/wxprec.h" 
    218#ifdef __BORLANDC__ 
     
    1228#include <wx/filename.h> 
    1329 
    14 #include "database.h" 
    15 #include "silayer.h" 
    16  
    17  
    1830 
    1931static const wxCmdLineEntryDesc cmdLineDesc[] = 
     
    2234        wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP }, 
    2335    { wxCMD_LINE_SWITCH, "v", "verbose", "Be more verbose" }, 
     36    { wxCMD_LINE_PARAM, NULL, NULL, "[structure sql file]"}, 
     37    { wxCMD_LINE_PARAM, NULL, NULL, "[content txt file]"}, 
     38    { wxCMD_LINE_PARAM, NULL, NULL, "[result sql file]"}, 
    2439    { wxCMD_LINE_NONE } 
    2540}; 
     
    4560    wxApp::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, "program"); 
    4661    wxInitializer initializer; 
    47     if ( !initializer ) 
    48     { 
     62    if ( !initializer ){ 
    4963        fprintf(stderr, "Failed to initialize the wxWidgets library, aborting."); 
    5064        return -1; 
    5165    } 
    5266     
    53     wxString myLogoTxt = _T("*\n* TmDmCreator \n* Create SQL Command for ToolMap projects \n* (c) Copyright 2013 Lucien Schreiber - CREALP . All Rights Reserved. \n*\n"); 
     67    wxString myLogoTxt = _T("*\n* TmDmCreator \n* Create SQL file for ToolMap projects \n* (c) Copyright 2013 Lucien Schreiber - CREALP . All Rights Reserved. \n*\n"); 
    5468    wxCmdLineParser parser(cmdLineDesc, argc, argv); 
    55     parser.AddParam(_T("[ToolMap project file]"), wxCMD_LINE_VAL_STRING); 
    56     parser.AddParam(_T("[SHP directory]"), wxCMD_LINE_VAL_STRING); 
    57     parser.AddParam(_T("[rule files]"),wxCMD_LINE_VAL_STRING,  wxCMD_LINE_PARAM_MULTIPLE); 
    5869    parser.SetLogo(myLogoTxt); 
    59      
    6070    if (parser.Parse() != 0) { 
    6171        return 0; 
    6272    } 
    6373     
    64     bool beVerbose = parser.Found("verbose"); 
    65      
    6674    // cmd line is correct !! 
    67     wxPrintf(myLogoTxt);     
     75    wxPrintf(myLogoTxt); 
    6876    return 0; 
    6977} 
Note: See TracChangeset for help on using the changeset viewer.