equal
deleted
inserted
replaced
65 static const string_t OPTION_INPUT_ATTRIBUTES_PREPEND; |
65 static const string_t OPTION_INPUT_ATTRIBUTES_PREPEND; |
66 static const string_t OPTION_DEBUG_VARIABLE_MAPPING; |
66 static const string_t OPTION_DEBUG_VARIABLE_MAPPING; |
67 static const string_t OPTION_BEFORE_RECORDS; |
67 static const string_t OPTION_BEFORE_RECORDS; |
68 static const string_t OPTION_AFTER_RECORDS; |
68 static const string_t OPTION_AFTER_RECORDS; |
69 static const string_t OPTION_FOR_EACH; |
69 static const string_t OPTION_FOR_EACH; |
|
70 static const string_t OPTION_WHERE; |
70 static const string_t OPTION_DROP; |
71 static const string_t OPTION_DROP; |
71 static const string_t OPTION_DEFINE; |
72 static const string_t OPTION_DEFINE; |
72 |
73 |
73 Configuration parse(const std::vector<string_t>& arguments) { |
74 Configuration parse(const std::vector<string_t>& arguments) { |
74 Configuration c; |
75 Configuration c; |
78 string_t option = readNext(arguments, i); |
79 string_t option = readNext(arguments, i); |
79 |
80 |
80 if (option == OPTION_BEFORE_RECORDS) currentRelation.awkBeforeRecords = readNext(arguments, i); |
81 if (option == OPTION_BEFORE_RECORDS) currentRelation.awkBeforeRecords = readNext(arguments, i); |
81 else if (option == OPTION_AFTER_RECORDS) currentRelation.awkAfterRecords = readNext(arguments, i); |
82 else if (option == OPTION_AFTER_RECORDS) currentRelation.awkAfterRecords = readNext(arguments, i); |
82 else if (option == OPTION_FOR_EACH) currentRelation.awkForEach = readNext(arguments, i); |
83 else if (option == OPTION_FOR_EACH) currentRelation.awkForEach = readNext(arguments, i); |
|
84 else if (option == OPTION_WHERE) currentRelation.awkForEach = L"(" + readNext(arguments, i) + L")"; |
83 else if (option == OPTION_DROP) currentRelation.drop = true; |
85 else if (option == OPTION_DROP) currentRelation.drop = true; |
84 else if (option == OPTION_INPUT_ATTRIBUTES_APPEND) currentRelation.inputAttributesAppend = true; |
86 else if (option == OPTION_INPUT_ATTRIBUTES_APPEND) currentRelation.inputAttributesAppend = true; |
85 else if (option == OPTION_INPUT_ATTRIBUTES_PREPEND) currentRelation.inputAttributesPrepend = true; |
87 else if (option == OPTION_INPUT_ATTRIBUTES_PREPEND) currentRelation.inputAttributesPrepend = true; |
86 else if (option == OPTION_DEBUG_VARIABLE_MAPPING) currentRelation.debugVariableMapping = true; |
88 else if (option == OPTION_DEBUG_VARIABLE_MAPPING) currentRelation.debugVariableMapping = true; |
87 else if (option == OPTION_RELATION) { |
89 else if (option == OPTION_RELATION) { |
116 const string_t CLIParser::OPTION_INPUT_ATTRIBUTES_PREPEND = L"--input-attributes-prepend"; |
118 const string_t CLIParser::OPTION_INPUT_ATTRIBUTES_PREPEND = L"--input-attributes-prepend"; |
117 const string_t CLIParser::OPTION_DEBUG_VARIABLE_MAPPING = L"--debug-variable-mapping"; |
119 const string_t CLIParser::OPTION_DEBUG_VARIABLE_MAPPING = L"--debug-variable-mapping"; |
118 const string_t CLIParser::OPTION_BEFORE_RECORDS = L"--before-records"; |
120 const string_t CLIParser::OPTION_BEFORE_RECORDS = L"--before-records"; |
119 const string_t CLIParser::OPTION_AFTER_RECORDS = L"--after-records"; |
121 const string_t CLIParser::OPTION_AFTER_RECORDS = L"--after-records"; |
120 const string_t CLIParser::OPTION_FOR_EACH = L"--for-each"; |
122 const string_t CLIParser::OPTION_FOR_EACH = L"--for-each"; |
|
123 const string_t CLIParser::OPTION_WHERE = L"--where"; |
121 const string_t CLIParser::OPTION_DROP = L"--drop"; |
124 const string_t CLIParser::OPTION_DROP = L"--drop"; |
122 const string_t CLIParser::OPTION_DEFINE = L"--define"; |
125 const string_t CLIParser::OPTION_DEFINE = L"--define"; |
123 |
126 |
124 } |
127 } |
125 } |
128 } |