本文整理汇总了C++中StringStack::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ StringStack::push_back方法的具体用法?C++ StringStack::push_back怎么用?C++ StringStack::push_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringStack
的用法示例。
在下文中一共展示了StringStack::push_back方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ScreenUpdates_Disable
void ScreenUpdates_Disable (const std::string& message, const std::string& title)
{
if (g_wait_stack.empty()) {
map::AutoSaver().stopTimer();
while (gtk_events_pending()) {
gtk_main_iteration();
}
const bool isActiveApp = MainFrame_isActiveApp();
g_wait = create_wait_dialog(title, message);
if (isActiveApp) {
gtk_widget_show(GTK_WIDGET(g_wait.m_window));
gtk_grab_add(GTK_WIDGET(g_wait.m_window));
ScreenUpdates_process();
}
} else if (GTK_WIDGET_VISIBLE(g_wait.m_window)) {
gtk_label_set_text(g_wait.m_label, message.c_str());
ScreenUpdates_process();
}
g_wait_stack.push_back(message);
}
示例2: doType
void MessageGenerator::doType(StringStack& parent, int indent, const char* tag, IXmlType* type, StringBuffer& buf)
{
const char* typeName = type->queryName();
if (type->isComplexType())
{
if (typeName && std::find(parent.begin(),parent.end(),typeName) != parent.end())
{
//DBGLOG("Recursive type: %s, ignored", type->queryName());
}
else
{
int flds = type->getFieldCount();
for (int i=0; i<flds; i++)
{
const char* fldName = type->queryFieldName(i);
buf.appendf("<%s>", fldName);
if (typeName)
parent.push_back(typeName);
doType(parent,indent+1,fldName,type->queryFieldType(i),buf);
buf.appendf("</%s>", fldName);
if (typeName)
parent.pop_back();
}
}
}
else if (type->isArray())
{
if (typeName && std::find(parent.begin(),parent.end(),typeName) != parent.end())
{
//DBGLOG("Recursive type: %s, ignored", type->queryName());
}
else
{
const char* itemName = type->queryFieldName(0);
IXmlType* itemType = type->queryFieldType(0);
if (typeName)
parent.push_back(typeName);
for (int i=0; i<m_items; i++)
{
buf.appendf("<%s>", itemName);
doType(parent,indent+2,itemName, itemType, buf);
buf.appendf("</%s>", itemName);
}
if (m_ecl2esp)
buf.appendf("<%s/>", itemName);
if (typeName)
parent.pop_back();
}
}
else
{
//TODO: handle restriction etc
if (strcmp(typeName,"string")==0) // string type: [tag-typeName]
{
if (m_gx)
buf.append("*** MISSING ***");
else
if (m_ecl2esp)
buf.append("[?]");
else
buf.appendf("[%s]", tag);
}
else
setDefaultValue(buf,type,tag);
}
}