src/CLIParser.h
branchv_0
changeset 13 c9fece435aa2
parent 12 7977c1bdba1f
child 14 82bd0f57a889
equal deleted inserted replaced
12:7977c1bdba1f 13:c9fece435aa2
    95 				} else if (option == OPTION_DEFINE) {
    95 				} else if (option == OPTION_DEFINE) {
    96 					DefinitionRecipe definition;
    96 					DefinitionRecipe definition;
    97 					definition.name = readNext(arguments, i);
    97 					definition.name = readNext(arguments, i);
    98 					definition.type = readNext(arguments, i);
    98 					definition.type = readNext(arguments, i);
    99 					definition.value = readNext(arguments, i);
    99 					definition.value = readNext(arguments, i);
   100 					currentRelation.definitions.push_back(definition);
   100 					if (currentRelation.relation.size()) currentRelation.definitions.push_back(definition);
       
   101 					else c.definitions.push_back(definition);
   101 				} else throw relpipe::cli::RelpipeCLIException(L"Unsupported CLI option: " + option, relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS);
   102 				} else throw relpipe::cli::RelpipeCLIException(L"Unsupported CLI option: " + option, relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS);
   102 
   103 
   103 			}
   104 			}
   104 
   105 
   105 			addRelation(c, currentRelation); // last relation
   106 			addRelation(c, currentRelation); // last relation