本文整理汇总了C++中SPString::size方法的典型用法代码示例。如果您正苦于以下问题:C++ SPString::size方法的具体用法?C++ SPString::size怎么用?C++ SPString::size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SPString
的用法示例。
在下文中一共展示了SPString::size方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadFromString
bool SUIManager::LoadFromString( SPString stringStream )
{
SPString screensString = SPStringHelper::XMLExcludeFrom(stringStream, L"ScreenList");
stringStream = SPStringHelper::XMLRemoveFirst(stringStream, L"ScreenList");
while(screensString.size() > 0)
{
SPString screenString = SPStringHelper::XMLExcludeFrom(screensString, L"SUIScreen");
screensString = SPStringHelper::XMLRemoveFirst(screensString, L"SUIScreen");
SPString screenNameString = SPStringHelper::XMLExcludeFrom(screenString, L"Name");
SUIScreenPtr screen = new SUIScreen();
screen->SetName(screenNameString);
AddScreen(screen);
dispalyStack.push_back(screen);
screen->LoadFromString(screenString);
}
dispalyStack.clear();
SPString displayStackString = SPStringHelper::XMLExcludeFrom(stringStream, L"DisplayStack");
stringStream = SPStringHelper::XMLRemoveFirst(stringStream, L"DisplayStack");
while(displayStackString.size() > 0)
{
SPString screenNameString = SPStringHelper::XMLExcludeFrom(displayStackString, L"ScreenName");
displayStackString = SPStringHelper::XMLRemoveFirst(displayStackString, L"ScreenName");
dispalyStack.push_front(GetScreen(screenNameString));
}
return true;
}
示例2: LoadFromString
bool SScriptManager::LoadFromString( SPString stringStream )
{
SPString commandsString = SPStringHelper::XMLExcludeFrom(stringStream, L"Commands");
stringStream = SPStringHelper::XMLRemoveFirst(stringStream, L"Commands");
commands.clear();
while(commandsString.size() > 0)
{
SPString commandString = SPStringHelper::XMLExcludeFrom(commandsString, L"SSC");
commandsString = SPStringHelper::XMLRemoveFirst(commandsString, L"SSC");
SPString commandName = SPStringHelper::XMLExcludeFrom(commandString, L"CN");
SPString commandArgs = SPStringHelper::XMLExcludeFrom(commandString, L"Properties");
SPString commandFile = SPStringHelper::XMLExcludeFrom(commandString, L"FN");
int commandOrder = SPStringHelper::StringToInt(SPStringHelper::XMLExcludeFrom(commandString, L"OD"));
SScriptCommand command(commandName, SScriptHelper::StringToVariables(commandArgs), commandFile, commandOrder);
commands.push_back(command);
}
SPString innerVariablesString = SPStringHelper::XMLExcludeFrom(stringStream, L"InnerVariables");
stringStream = SPStringHelper::XMLRemoveFirst(stringStream, L"InnerVariables");
innerScript->SetVariableMap(SScriptHelper::StringToVariables(innerVariablesString));
SPString outerVariablesString = SPStringHelper::XMLExcludeFrom(stringStream, L"OuterVariables");
stringStream = SPStringHelper::XMLRemoveFirst(stringStream, L"OuterVariables");
script->SetVariableMap(SScriptHelper::StringToVariables(innerVariablesString));
SPString functionsString = SPStringHelper::XMLExcludeFrom(stringStream, L"Functions");
stringStream = SPStringHelper::XMLRemoveFirst(stringStream, L"Functions");
while(functionsString.size() > 0)
{
SPString functionString = SPStringHelper::XMLExcludeFrom(functionsString, L"F");
functionsString = SPStringHelper::XMLRemoveFirst(functionsString, L"F");
SPString functionName = SPStringHelper::XMLExcludeFrom(functionString, L"N");
SPString functionScript = SPStringHelper::XMLExcludeFrom(functionString, L"S");
AddUserDefinedFunction(functionName, new ScriptStringFunction(this, functionScript));
}
return true;
}
示例3: LoadFromString
bool SUIPictureManager::LoadFromString( SPString stringStream )
{
SPString picturesString = SPStringHelper::XMLExcludeFrom(stringStream, L"Pictures");
stringStream = SPStringHelper::XMLRemoveFirst(stringStream, L"Pictures");
while(picturesString.size() > 0)
{
SPString pictureString = SPStringHelper::XMLExcludeFrom(picturesString, L"SUIPL");
picturesString = SPStringHelper::XMLRemoveFirst(picturesString, L"SUIPL");
SPString propertiesString = SPStringHelper::XMLExcludeFrom(pictureString, L"Properties");
pictureString = SPStringHelper::XMLRemoveFirst(pictureString, L"Properties");
VariableMap properties = SScriptHelper::StringToVariables(propertiesString);
SScriptFunctionPtr buildPicture = new SSFPicture();
buildPicture->Function(properties, false);
SPString mixImagesString = SPStringHelper::XMLExcludeFrom(pictureString, L"MPS");
pictureString = SPStringHelper::XMLRemoveFirst(pictureString, L"MPS");
SScriptFunctionPtr mixPicture = new SSFMixPicture();
while(mixImagesString.size() > 0)
{
SPString mixImageString = SPStringHelper::XMLExcludeFrom(mixImagesString, L"SUIMI");
mixImagesString = SPStringHelper::XMLRemoveFirst(mixImagesString, L"SUIMI");
VariableMap miProperties = SScriptHelper::StringToVariables(mixImageString);
mixPicture->Function(miProperties, false);
}
}
SPString currentPictureString = SPStringHelper::XMLExcludeFrom(stringStream, L"CurrentPictureName");
stringStream = SPStringHelper::XMLRemoveFirst(stringStream, L"CurrentPictureName");
currentPicture = GetPicture(currentPictureString);
return true;
}
示例4: ReadCommandsFromString
bool SScriptManager::ReadCommandsFromString( SPString stringStream )
{
readCommands.Clear();
SPString readRommandsString = SPStringHelper::XMLExcludeFrom(stringStream, L"RC");
stringStream = SPStringHelper::XMLRemoveFirst(stringStream, L"RC");
while(readRommandsString.size() > 0)
{
SPString commandString = SPStringHelper::XMLExcludeFrom(readRommandsString, L"FR");
readRommandsString = SPStringHelper::XMLRemoveFirst(readRommandsString, L"FR");
SPString commandFileName = SPStringHelper::XMLExcludeFrom(commandString, L"FN");
SPString commandReadRegionsString = SPStringHelper::XMLExcludeFrom(commandString, L"RL");
if (commandFileName == L"")
{
continue;
}
RegionListPtr regionList = new RegionList();
while(commandReadRegionsString.size() > 0)
{
SPString regionString = SPStringHelper::XMLExcludeFrom(commandReadRegionsString, L"R");
commandReadRegionsString = SPStringHelper::XMLRemoveFirst(commandReadRegionsString, L"R");
int beginOrder = SPStringHelper::StringToInt(SPStringHelper::XMLExcludeFrom(regionString, L"B"));
int endOrder = SPStringHelper::StringToInt(SPStringHelper::XMLExcludeFrom(regionString, L"E"));
regionList->push_back(new Region(beginOrder,endOrder));
}
readCommands.Set(commandFileName, regionList);
}
return true;
}
示例5: CreatePath
bool SPFileHelper::CreatePath( SPString path )
{
if (path.size() == 0 || path == L"/" || path == L"\\")
{
return true;
}
if(IsPathExists(path.c_str()))
{
return true;
}
if(!CreatePath(GetUpperPath(path)))
{
return false;
}
if( FALSE == CreateDirectory(path.c_str(), NULL))
{
return false;
}
return true;
}