本文整理汇总了C++中IPropertyTree::addPropBool方法的典型用法代码示例。如果您正苦于以下问题:C++ IPropertyTree::addPropBool方法的具体用法?C++ IPropertyTree::addPropBool怎么用?C++ IPropertyTree::addPropBool使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPropertyTree
的用法示例。
在下文中一共展示了IPropertyTree::addPropBool方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getNavigationData
void CEspBinding::getNavigationData(IEspContext &context, IPropertyTree & data)
{
IEspWsdlSections *wsdl = dynamic_cast<IEspWsdlSections *>(this);
if (wsdl)
{
StringBuffer serviceName, params;
wsdl->getServiceName(serviceName);
if (!getUrlParams(context.queryRequestParameters(), params))
{
if (context.getClientVersion()>0)
params.appendf("%cver_=%g", params.length()?'&':'?', context.getClientVersion());
}
StringBuffer encodedparams;
if (params.length())
encodeUtf8XML(params.str(), encodedparams, 0);
if (params.length())
params.setCharAt(0,'&'); //the entire params string will follow the initial param: "?form"
VStringBuffer folderpath("Folder[@name='%s']", serviceName.str());
IPropertyTree *folder = data.queryPropTree(folderpath.str());
if(!folder)
{
folder=createPTree("Folder");
folder->addProp("@name", serviceName.str());
folder->addProp("@info", serviceName.str());
folder->addProp("@urlParams", encodedparams);
if (showSchemaLinks())
folder->addProp("@showSchemaLinks", "true");
folder->addPropBool("@isDynamicBinding", isDynamicBinding());
folder->addPropBool("@isBound", isBound());
data.addPropTree("Folder", folder);
}
MethodInfoArray methods;
wsdl->getQualifiedNames(context, methods);
ForEachItemIn(idx, methods)
{
CMethodInfo &method = methods.item(idx);
IPropertyTree *link=createPTree("Link");
link->addProp("@name", method.m_label.str());
link->addProp("@info", method.m_label.str());
StringBuffer path;
path.appendf("../%s/%s?form%s", serviceName.str(), method.m_label.str(),params.str());
link->addProp("@path", path.str());
folder->addPropTree("Link", link);
}
}
示例2:
IPropertyTree *CEspBinding::ensureNavFolder(IPropertyTree &root, const char *name, const char *tooltip, const char *menuname, bool sort, unsigned relPosition)
{
StringBuffer xpath;
xpath.appendf("Folder[@name=\"%s\"]", name);
IPropertyTree *ret = root.queryPropTree(xpath.str());
if (!ret)
{
ret=createPTree("Folder");
ret->addProp("@name", name);
ret->addProp("@tooltip", tooltip);
ret->setProp("@menu", menuname);
if (sort)
ret->addPropBool("@sort", true);
ret->addPropInt("@relPosition", relPosition);
root.addPropTree("Folder", ret);
}
return ret;
}