int main( int argc, char **argv )
{
// Use an ArgumentParser object to manage the program arguments
osg::ArgumentParser arguments(&argc, argv);
std::string stringArgument = "defaultValue";
while(arguments.read("-myStringArgument", stringArgument));
double doubleArgument = 0.0f;
while(arguments.read("-myDoubleArgument", doubleArgument));
// And so on for other data types...
// Rest of main...
}