本文整理汇总了C++中IPropertyTree::setPropInt方法的典型用法代码示例。如果您正苦于以下问题:C++ IPropertyTree::setPropInt方法的具体用法?C++ IPropertyTree::setPropInt怎么用?C++ IPropertyTree::setPropInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPropertyTree
的用法示例。
在下文中一共展示了IPropertyTree::setPropInt方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: createPTree
IPropertyTree *CEspBinding::addNavException(IPropertyTree &folder, const char *message/*=NULL*/, int code/*=0*/, const char *source/*=NULL*/)
{
IPropertyTree *ret = folder.addPropTree("Exception", createPTree());
ret->addProp("@message", message ? message : "Unknown exception");
ret->setPropInt("@code", code);
ret->setProp("@source", source);
return ret;
}
示例3: doSingleSwapNode
bool doSingleSwapNode(const char *oldip,const char *newip,unsigned nodenum,IPropertyTree *info,const char *timechecked)
{
if (doSwap(oldip,newip)) {
if (info) {
StringBuffer times(timechecked);
if (times.length()==0) {
CDateTime dt;
dt.setNow();
dt.getString(times);
}
// TBD tie up with bad node in auto?
IPropertyTree *swap = info->addPropTree("Swap",createPTree("Swap"));
swap->setProp("@inNetAddress",newip);
swap->setProp("@outNetAddress",oldip);
swap->setProp("@time",times.str());
if (UINT_MAX != nodenum)
swap->setPropInt("@rank",nodenum-1);
}
return true;
}
return false;
}
示例4: setExpiryTime
void setExpiryTime(IPropertyTree & properties, unsigned expireDays)
{
properties.setPropInt("@expireDays", expireDays);
}