本文整理汇总了C++中Status::SetUserChoice方法的典型用法代码示例。如果您正苦于以下问题:C++ Status::SetUserChoice方法的具体用法?C++ Status::SetUserChoice怎么用?C++ Status::SetUserChoice使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Status
的用法示例。
在下文中一共展示了Status::SetUserChoice方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
std::map<std::string, Status*> Status::GetAllStatusses()
{
if (s_allStatusses.size() == 0)
{
IImageManager* imageManager = PlatformSpecific::GetImageManager();
//otherwise open status XML file
typedef vector<XMLNode*>::const_iterator SI;
vector<XMLNode*> statusNodes = BmeClient::GetPreferences()->GetIconPrefs()->GetStatusNodes();
for (SI s = statusNodes.begin(); s != statusNodes.end(); ++s)
{
XMLNode* statusNode = *s;
if (statusNode->Name() == "status")
{
vector<XMLNode*> children = statusNode->Children();
Status* status = new Status();
for (SI c = children.begin(); c != children.end(); ++c)
{
XMLNode* statusChild = *c;
if (statusChild->Name() == "icon")
{
std::string iconPath = statusChild->StringValue();
IPath* iconFullPath = PlatformSpecific::GetPathManager()->GetIconPrefsPath()->Append(iconPath);
Image* statusIcon = imageManager->GetImageFromFile(iconFullPath->ToString());
status->AddIcon(statusIcon);
delete iconFullPath;
}
else if (statusChild->Name() == "message")
{
status->SetStatusName(statusChild->StringValue());
}
else if (statusChild->Name() == "protocol")
{
status->SetAbbreviation(statusChild->StringValue());
}
else if (statusChild->Name() == "visible")
{
bool userChoice = atoi(statusChild->StringValue().c_str());
status->SetUserChoice(userChoice);
}
else if (statusChild->Name() == "color")
{
}
}
s_allStatusses[status->GetAbbreviation()] = (status);
}
}
delete imageManager;
}
return s_allStatusses;
}