16 parser.
setExampleLongOption(
"phoenix_clock_mock_merge --input=file.clockmock --output=merged.clockmock");
17 parser.
setExampleShortOption(
"phoenix_clock_mock_merge -i file2.clockmock file2.clockmock -o merged.clockmock");
21 PString defaultOutputFile(
"./merged.clockmock");
22 parser.
addOption(
"output",
"o", defaultOutputFile,
"Name of the output merged mock file");
34 for(std::vector<PString>::const_iterator itFile(vecInputFile.begin()); itFile != vecInputFile.end() && b; ++itFile){
48 int main(
int argc,
char** argv){
53 std::vector<PString> vecInputFile;
55 defaultMode.
getValue(vecInputFile,
"input");
56 defaultMode.
getValue(outputFile,
"output");
57 return mergeMock(vecInputFile, outputFile) - 1;
std::vector< time_t > VecTime
Describe a mode in the program arguments.
bool getValue(T &value, const PString &optionName) const
Get the value of the option.
Parse the options passed to a program.
void parseArgument(int argc, char **argv)
Parse the arguments passed to the program.
void addOption(const PString &longOption, const PString &shortOption, OptionType::OptionType optionType, bool isRequired, const PString &docString)
Add an option in the OptionParser.
void setExampleShortOption(const PString &example)
Set the example usage of the program.
void setExampleLongOption(const PString &example)
Set the example usage of the program.
const OptionMode & getDefaultMode() const
Get default mode.
bool data_load(FILE *iter, T &data)
Load data from a message.
bool data_save(FILE *iter, const T &data)
Save data in a message.
int main(int argc, char **argv)
bool mergeMock(const std::vector< PString > &vecInputFile, const PString &outputFile)
Merge mock files.
OptionParser createOptionParser()
Create the OptionParser of this program.
void concatenateVecTime(VecTime &vecOutput, const VecTime vecInput)
Concatenate vector of message into an other one.