本文整理汇总了C++中StHandle::hasArgs方法的典型用法代码示例。如果您正苦于以下问题:C++ StHandle::hasArgs方法的具体用法?C++ StHandle::hasArgs怎么用?C++ StHandle::hasArgs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StHandle
的用法示例。
在下文中一共展示了StHandle::hasArgs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int , char** ) { // force console output
#else
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) { // prevent console output
#endif
setlocale(LC_ALL, ".OCP"); // we set default locale for console output (useful only for debug)
#else
int main(int , char** ) {
#endif
StOutPageFlip::initGlobalsAsync();
if(!StVersionInfo::checkTimeBomb("sView")) {
return 1;
}
// setup environment variables
const StString ST_ENV_NAME_STCORE_PATH =
#if defined(_WIN64) || defined(_LP64) || defined(__LP64__)
"StCore64";
#else
"StCore32";
#endif
const StString aProcessPath = StProcess::getProcessFolder();
StString aProcessUpPath = StFileNode::getFolderUp(aProcessPath);
if(!aProcessUpPath.isEmpty()) {
aProcessUpPath += SYS_FS_SPLITTER;
}
StProcess::setEnv(ST_ENV_NAME_STCORE_PATH, aProcessPath);
if(StFolder::isFolder(aProcessPath + "textures")) {
StProcess::setEnv("StShare", aProcessPath);
} else if(StFolder::isFolder(aProcessUpPath + "textures")) {
StProcess::setEnv("StShare", aProcessUpPath);
}
StString aResDir = StProcess::getStShareFolder();
StProcess::setEnv("CSF_UnitsLexicon", aResDir + "UnitsAPI" ST_FILE_SPLITTER "Lexi_Expr.dat");
StProcess::setEnv("CSF_UnitsDefinition", aResDir + "UnitsAPI" ST_FILE_SPLITTER "Units.dat");
StProcess::setEnv("CSF_ShadersDirectory", aResDir + "shaders" ST_FILE_SPLITTER "StCADViewer");
StProcess::setEnv("CSF_SHMessage", aResDir + "lang");
StProcess::setEnv("CSF_MDTVTexturesDirectory", aResDir + "textures");
StHandle<StOpenInfo> anInfo;
if(anInfo.isNull()
|| (!anInfo->hasPath() && !anInfo->hasArgs())) {
anInfo = StApplication::parseProcessArguments();
}
if(anInfo.isNull()) {
// show help
StString aShowHelpString = getAbout();
st::cout << aShowHelpString;
stInfo(aShowHelpString);
return 0;
}
StHandle<StResourceManager> aResMgr = new StResourceManager();
StHandle<StCADViewer> anApp = new StCADViewer(aResMgr, NULL, anInfo);
if(!anApp->open()) {
return 1;
}
return anApp->exec();
}