本文整理汇总了C++中IPropertyTree::setPropBool方法的典型用法代码示例。如果您正苦于以下问题:C++ IPropertyTree::setPropBool方法的具体用法?C++ IPropertyTree::setPropBool怎么用?C++ IPropertyTree::setPropBool使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPropertyTree
的用法示例。
在下文中一共展示了IPropertyTree::setPropBool方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
IPropertyTree *CEspBinding::ensureNavLink(IPropertyTree &folder, const char *name, const char *path, const char *tooltip, const char *menuname, const char *navPath, unsigned relPosition, bool force)
{
StringBuffer xpath;
xpath.appendf("Link[@name=\"%s\"]", name);
bool addNew = true;
IPropertyTree *ret = folder.queryPropTree(xpath.str());
if (ret)
{
bool forced = ret->getPropBool("@force");
if (forced || !force)
return ret;
addNew = false;
}
if (addNew)
ret=createPTree("Link");
ret->setProp("@name", name);
ret->setProp("@tooltip", tooltip);
ret->setProp("@path", path);
ret->setProp("@menu", menuname);
ret->setProp("@navPath", navPath);
ret->setPropInt("@relPosition", relPosition);
ret->setPropBool("@force", force);
if (addNew)
folder.addPropTree("Link", ret);
return ret;
}
示例2: setSessionTimeout
void CWSESPControlEx::setSessionTimeout(int timeoutMinutes, IPropertyTree& session)
{
CDateTime timeNow;
timeNow.setNow();
time_t simple = timeNow.getSimple() + timeoutMinutes*60;
session.setPropInt64(PropSessionTimeoutAt, simple);
session.setPropBool(PropSessionTimeoutByAdmin, true);
}
示例3: addSimpleGraphEdge
void addSimpleGraphEdge(IPropertyTree * subGraph, unsigned __int64 source, unsigned __int64 target, unsigned outputIndex, unsigned inputIndex, IAtom * kind, const char * label, bool nWay)
{
IPropertyTree *edge = createPTree();
edge->setPropInt64("@target", target);
edge->setPropInt64("@source", source);
if (outputIndex != 0)
addGraphAttributeInt(edge, "_sourceIndex", outputIndex);
if (inputIndex != 0)
addGraphAttributeInt(edge, "_targetIndex", inputIndex);
if (label)
edge->setProp("@label", label);
if (kind == dependencyAtom)
addGraphAttributeBool(edge, "_dependsOn", true);
if (nWay)
edge->setPropBool("@nWay", true);
StringBuffer s;
edge->setProp("@id", s.append(source).append('_').append(outputIndex).str());
subGraph->addPropTree("edge", edge);
}