本文整理汇总了C++中CPVRTString::empty方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVRTString::empty方法的具体用法?C++ CPVRTString::empty怎么用?C++ CPVRTString::empty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVRTString
的用法示例。
在下文中一共展示了CPVRTString::empty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InitApplication
bool PODPlayer::InitApplication()
{
// set up console/log
m_pConsole = ConsoleLog::ptr();
// grab pointers to these handlers and initialise them
m_pUniformHandler = UniformHandler::ptr();
m_pTimeController = TimeController::ptr();
m_psMeshManager = NULL;
m_psTransparentMeshManager = NULL;
m_pOptionsMenu = NULL;
// deal with command line
int i32NumCLOptions = PVRShellGet(prefCommandLineOptNum);
SCmdLineOpt* sCLOptions = (SCmdLineOpt*)PVRShellGet(prefCommandLineOpts);
CPVRTString strFilename;
PVRESParser cParser;
bool bFoundFile = false;
if(sCLOptions)
{
for(int i=0;i<i32NumCLOptions;++i)
{
if(!sCLOptions[i].pVal)
{ // could be script or pod
strFilename=sCLOptions[i].pArg;
// determine whether a script or a POD or nothing
CPVRTString strExtension = PVRTStringGetFileExtension(strFilename);
if(strExtension.compare(".pvres")==0
|| strExtension.compare(".PVRES")==0)
{ // script file
m_pConsole->log("Found script:%s\n", strFilename.c_str());
cParser.setScriptFileName(strFilename);
bFoundFile = true;
}
else
{
if(strExtension.compare(".pod")==0
|| strExtension.compare(".POD")==0)
{ // pod file
m_pConsole->log("Found POD\n");
cParser.setPODFileName(strFilename);
bFoundFile = true;
}
else
{
m_pConsole->log("Unrecognised filetype.\n");
}
}
}
}
}
if(!bFoundFile)
{ // no command line options so open default pvres
CPVRTString strDefaultPVRES((char*)(PVRShellGet(prefReadPath)));
strDefaultPVRES += "Sample.pvres";
cParser.setScriptFileName(strDefaultPVRES);
}
m_cPVRES = cParser.Parse();
// sets up whether the console should write out constantly or not
CPVRTString strLogPath = CPVRTString((char*)PVRShellGet(prefWritePath));
m_pConsole->setOutputFile(strLogPath+="log.txt");
m_pConsole->setStraightToFile(m_cPVRES.getLogToFile());
m_pConsole->log("PODPlayer v0.2 alpha\n\n Initialising...\n");
CPVRTString error = cParser.getError();
if(!error.empty())
{
m_pConsole->log("Couldn't parse script: %s:\n%s",m_cPVRES.getScriptFileName().c_str(),error.c_str());
PVRShellSet(prefExitMessage, m_pConsole->getLastLogLine().c_str());
return false;
}
// Deal with results of script read
// Load the scene from the .pod file into a CPVRTModelPOD object.
if(m_Scene.ReadFromFile(m_cPVRES.getPODFileName().c_str()) != PVR_SUCCESS)
{
m_pConsole->log("Error: couldn't open POD file: %s\n",m_cPVRES.getPODFileName().c_str());
PVRShellSet(prefExitMessage, m_pConsole->getLastLogLine().c_str());
return false;
}
// The cameras are stored in the file. Check if it contains at least one.
if(m_Scene.nNumCamera == 0)
{
m_bFreeCamera = true;
}
else
{
m_bFreeCamera = false;
}
//.........这里部分代码省略.........