tool/main.cpp
branchstable-1.5
changeset 2436 960cc1bb6b4a
parent 2011 04fdb4abf120
child 2529 c7e1f2616a9d
equal deleted inserted replaced
2435:4151f6f4c3e1 2436:960cc1bb6b4a
    83 string dataTypeStr;
    83 string dataTypeStr;
    84 Command::Verbosity verbosity = Command::Normal;
    84 Command::Verbosity verbosity = Command::Normal;
    85 bool force = false;
    85 bool force = false;
    86 bool helpRequested = false;
    86 bool helpRequested = false;
    87 string outputFile;
    87 string outputFile;
       
    88 string skin;
    88 
    89 
    89 /*****************************************************************************/
    90 /*****************************************************************************/
    90 
    91 
    91 string usage()
    92 string usage()
    92 {
    93 {
   145         {"alias",       required_argument, NULL, 'a'},
   146         {"alias",       required_argument, NULL, 'a'},
   146         {"position",    required_argument, NULL, 'p'},
   147         {"position",    required_argument, NULL, 'p'},
   147         {"domain",      required_argument, NULL, 'd'},
   148         {"domain",      required_argument, NULL, 'd'},
   148         {"type",        required_argument, NULL, 't'},
   149         {"type",        required_argument, NULL, 't'},
   149         {"output-file", required_argument, NULL, 'o'},
   150         {"output-file", required_argument, NULL, 'o'},
       
   151         {"skin",        required_argument, NULL, 's'},
   150         {"force",       no_argument,       NULL, 'f'},
   152         {"force",       no_argument,       NULL, 'f'},
   151         {"quiet",       no_argument,       NULL, 'q'},
   153         {"quiet",       no_argument,       NULL, 'q'},
   152         {"verbose",     no_argument,       NULL, 'v'},
   154         {"verbose",     no_argument,       NULL, 'v'},
   153         {"help",        no_argument,       NULL, 'h'},
   155         {"help",        no_argument,       NULL, 'h'},
   154         {}
   156         {}
   155     };
   157     };
   156 
   158 
   157     do {
   159     do {
   158         c = getopt_long(argc, argv, "m:a:p:d:t:o:fqvh", longOptions, NULL);
   160         c = getopt_long(argc, argv, "m:a:p:d:t:o:s:fqvh", longOptions, NULL);
   159 
   161 
   160         switch (c) {
   162         switch (c) {
   161             case 'm':
   163             case 'm':
   162                 masters = optarg;
   164                 masters = optarg;
   163                 break;
   165                 break;
   178                 dataTypeStr = optarg;
   180                 dataTypeStr = optarg;
   179                 break;
   181                 break;
   180 
   182 
   181             case 'o':
   183             case 'o':
   182                 outputFile = optarg;
   184                 outputFile = optarg;
       
   185                 break;
       
   186 
       
   187             case 's':
       
   188                 skin = optarg;
   183                 break;
   189                 break;
   184 
   190 
   185             case 'f':
   191             case 'f':
   186                 force = true;
   192                 force = true;
   187                 break;
   193                 break;
   306                     cmd->setAliases(aliases);
   312                     cmd->setAliases(aliases);
   307                     cmd->setPositions(positions);
   313                     cmd->setPositions(positions);
   308                     cmd->setDomains(domains);
   314                     cmd->setDomains(domains);
   309                     cmd->setDataType(dataTypeStr);
   315                     cmd->setDataType(dataTypeStr);
   310                     cmd->setOutputFile(outputFile);
   316                     cmd->setOutputFile(outputFile);
       
   317                     cmd->setSkin(skin);
   311                     cmd->setForce(force);
   318                     cmd->setForce(force);
   312                     cmd->execute(commandArgs);
   319                     cmd->execute(commandArgs);
   313                 } catch (InvalidUsageException &e) {
   320                 } catch (InvalidUsageException &e) {
   314                     cerr << e.what() << endl << endl;
   321                     cerr << e.what() << endl << endl;
   315                     cerr << cmd->helpString(binaryBaseName);
   322                     cerr << cmd->helpString(binaryBaseName);