Adds a model history to a model.
#include <iostream>
void printStatus(std::string message, int status)
{
std::string statusString;
switch(status)
{
statusString = "succeeded";
break;
statusString = "invalid object";
break;
statusString = "operation failed";
break;
default:
statusString = "unknown";
break;
}
cout << message << statusString << endl;
}
int
main (int argc, char *argv[])
{
unsigned int errors;
if (argc != 3)
{
cout << endl
<< " usage: addModelHistory <input-filename> <output-filename>" << endl
<< endl;
return 2;
}
if (errors > 0)
{
cout << "Read Error(s):" << endl;
cout << "Correct the above and re-run." << endl;
}
else
{
printStatus("Status for addCreator: ", status);
Date * date =
new Date(
"1999-11-13T06:54:32");
Date * date2 =
new Date(
"2007-11-30T06:54:00-02:00");
printStatus("Set created date: ", status);
printStatus("Set modified date: ", status);
printStatus("Set model history: ", status);
}
delete d;
return errors;
}