本文整理汇总了C++中FileParser::Initialize方法的典型用法代码示例。如果您正苦于以下问题:C++ FileParser::Initialize方法的具体用法?C++ FileParser::Initialize怎么用?C++ FileParser::Initialize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileParser
的用法示例。
在下文中一共展示了FileParser::Initialize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char* argv[])
#endif
{
IFXRESULT result = IFX_OK;
#ifdef __MINGW32__
wchar_t **argw = NULL;
int argc=0;
#endif
#ifndef WIN32
wchar_t **argw = NULL;
int i;
#endif
result = IFXSetDefaultLocale();
IFXTRACE_GENERIC(L"[Converter] IFXSetDefaultLocale %i\n", result);
if( IFXSUCCESS(result) )
{
#ifdef __MINGW32__
argw = CommandLineToArgvW(GetCommandLineW(), &argc);
#endif
#ifndef WIN32
argw = (wchar_t**)malloc(argc*sizeof(wchar_t*));
if (argw == NULL)
result = IFX_E_OUT_OF_MEMORY;
if( IFXSUCCESS(result) )
{
memset(argw, 0, argc*sizeof(wchar_t*));
for (i=0; i<argc; i++)
{
argw[i] = mbs_to_wcs(argv[i]);
if (argw[i] == NULL)
{
result = IFX_E_OUT_OF_MEMORY;
break;
}
}
}
#endif
}
if( IFXSUCCESS(result) && argc > 2 )
{
if( 0 == wcscmp(L"-libdir", argw[argc-2]) || 0 == wcscmp(L"-l", argw[argc-2]) )
{
size_t size = wcstombs(NULL, argw[argc-1], 0);
if (size <= MAXIMUM_FILENAME_LENGTH)
{
#ifdef WIN32
SetEnvironmentVariable(L"U3D_LIBDIR", argw[argc-1]);
#else
char libdir[size+1];
wcstombs(libdir, argw[argc-1], size);
libdir[size] = 0;
setenv("U3D_LIBDIR",libdir,1);
#endif
argc -=2;
}
}
}
if( IFXSUCCESS(result) )
{
IFXDEBUG_STARTUP();
result = IFXCOMInitialize();
}
IFXTRACE_GENERIC(L"[Converter] IFXCOMInitialize %i\n", result);
if( IFXSUCCESS(result) )
{
ConverterOptions converterOptions;
FileOptions fileOptions;
if( IFXSUCCESS(result) )
SetDefaultOptionsX( &converterOptions, &fileOptions );
if( IFXSUCCESS(result) )
{
result = ReadAndSetUserOptionsX(
argc, argw,
&converterOptions, &fileOptions );
}
#ifdef STDIO_HACK
if( IFXSUCCESS(result) )
{
if ( fileOptions.outFile != L"stdout" && fileOptions.outFile != L"-" )
stdmsg = stdout;
}
#endif
if( IFXSUCCESS(result) )
{
SceneUtilities sceneUtils;
FileParser fileParser;
//.........这里部分代码省略.........