本文整理汇总了C++中ArgParse::argInts方法的典型用法代码示例。如果您正苦于以下问题:C++ ArgParse::argInts方法的具体用法?C++ ArgParse::argInts怎么用?C++ ArgParse::argInts使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArgParse
的用法示例。
在下文中一共展示了ArgParse::argInts方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main( int argc, const char** argv )
{
std::signal(SIGINT, aqsisSignalHandler);
std::signal(SIGABRT, aqsisSignalHandler);
RtInt returnCode = 0;
StartMemoryDebugging();
{
ArgParse ap;
ap.usageHeader( ArgParse::apstring( "Aqsis command line renderer\nUsage: " ) + argv[ 0 ] + " [options] [RIB file...]" );
ap.argFlag( "help", "\aPrint this help and exit", &g_cl_help );
ap.alias( "help" , "h" );
ap.argFlag( "version", "\aPrint version information and exit", &g_cl_version );
ap.argFlag( "pause", "\aWait for a keypress on completion", &g_cl_pause );
ap.argFlag( "progress", "\aPrint progress information", &g_cl_progress );
ap.argFlag( "Progress", "\aPrint PRMan-compatible progress information (ignores -progressformat)", &g_cl_Progress );
ap.argString( "progressformat", "=string\aprintf-style format string for -progress", &g_cl_strprogress );
ap.argInt( "endofframe", "=integer\aEquivalent to \"endofframe\" RIB option", &g_cl_endofframe );
ap.argInt( "verbose", "=integer\aSet log output level\n"
"\a0 = errors\n"
"\a1 = warnings (default)\n"
"\a2 = information\n"
"\a3 = debug", &g_cl_verbose );
ap.alias( "verbose", "v" );
ap.argFlag( "echoapi", "\aEcho all RI API calls to the log output (experimental)", &g_cl_echoapi);
ap.argInt( "priority", "=integer\aControl the priority class of aqsis.\n"
"\a0 = idle\n"
"\a1 = normal\n"
"\a2 = high\n"
"\a3 = RT", &g_cl_priority);
ap.alias( "priority", "z");
ap.argString( "type", "=string\aSpecify a display device type to use", &g_cl_type );
ap.argString( "addtype", "=string\aSpecify a display device type to add", &g_cl_addtype );
ap.argString( "mode", "=string\aSpecify a display device mode to use", &g_cl_mode );
ap.argFlag( "fb", "\aSame as --type=\"framebuffer\" --mode=\"rgb\"", &g_cl_fb );
ap.alias( "fb", "d" );
ap.argFloats( "crop", " x1 x2 y1 y2\aSpecify a crop window, values are in screen space.", &g_cl_cropWindow, ArgParse::SEP_ARGV, 4);
ap.argFlag( "nocolor", "\aDisable colored output", &g_cl_no_color );
ap.argFlag( "beep", "\aBeep on completion of all ribs", &g_cl_beep );
ap.alias( "nocolor", "nc" );
ap.argInts( "res", " x y\aSpecify the resolution of the render.", &g_cl_res, ArgParse::SEP_ARGV, 2);
ap.argStrings( "option", "=string\aA valid RIB Option string, can be specified multiple times.", &g_cl_options);
# ifdef AQSIS_SYSTEM_POSIX
ap.argFlag( "syslog", "\aLog messages to syslog", &g_cl_syslog );
# endif // AQSIS_SYSTEM_POSIX
# if ENABLE_MPDUMP
ap.argFlag( "mpdump", "\aOutput MP list to a custom 'dump' file", &g_cl_mpdump );
# endif // ENABLE_MPDUMP
ap.argString( "shaders", "=string\aOverride the default shader searchpath(s)", &g_cl_shader_path );
ap.argString( "archives", "=string\aOverride the default archive searchpath(s)", &g_cl_archive_path );
ap.argString( "textures", "=string\aOverride the default texture searchpath(s)", &g_cl_texture_path );
ap.argString( "displays", "=string\aOverride the default display searchpath(s)", &g_cl_display_path );
ap.argString( "procedurals", "=string\aOverride the default procedural searchpath(s)", &g_cl_procedural_path );
ap.allowUnrecognizedOptions();
if ( argc > 1 && !ap.parse( argc - 1, argv + 1 ) )
{
Aqsis::log() << ap.errmsg() << std::endl << ap.usagemsg();
return( 1 );
}
// Check that the number of arguments to crop are valid if specified.
if ( g_cl_cropWindow.size() > 0 && g_cl_cropWindow.size() != 4 )
{
Aqsis::log() << Aqsis::error << "Invalid number of arguments to -crop, expected 4, got " << g_cl_cropWindow.size() << std::endl;
g_cl_help = true;
}
if ( g_cl_help )
{
std::cout << ap.usagemsg();
return( 0 );
}
if ( g_cl_version )
{
std::cout << "aqsis version " << AQSIS_VERSION_STR_FULL
# ifdef _DEBUG
<< " (debug build)"
# endif
<< "\n"
<< "compiled " << __DATE__ << " " << __TIME__ << "\n";
return( 0 );
}
# ifdef AQSIS_SYSTEM_WIN32
std::auto_ptr<std::streambuf> ansi( new Aqsis::ansi_buf(Aqsis::log()) );
# endif
std::auto_ptr<std::streambuf> reset_level( new Aqsis::reset_level_buf(Aqsis::log()) );
std::auto_ptr<std::streambuf> show_timestamps( new Aqsis::timestamp_buf(Aqsis::log()) );
std::auto_ptr<std::streambuf> fold_duplicates( new Aqsis::fold_duplicates_buf(Aqsis::log()) );
std::auto_ptr<std::streambuf> color_level;
if(!g_cl_no_color)
{
std::auto_ptr<std::streambuf> temp_color_level( new Aqsis::color_level_buf(Aqsis::log()) );
color_level = temp_color_level;
//.........这里部分代码省略.........