本文整理汇总了C++中IPropertyTree::getPropInt64方法的典型用法代码示例。如果您正苦于以下问题:C++ IPropertyTree::getPropInt64方法的具体用法?C++ IPropertyTree::getPropInt64怎么用?C++ IPropertyTree::getPropInt64使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPropertyTree
的用法示例。
在下文中一共展示了IPropertyTree::getPropInt64方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: querySDS
static unsigned fn2(unsigned n, unsigned m, unsigned seed, unsigned depth, StringBuffer &parentname)
{
if (!Rconn)
return 0;
if ((n+m+seed)%25==0) {
Rconn->commit();
Rconn->Release();
Rconn = querySDS().connect("/DAREGRESS",myProcessSession(), 0, 1000000);
if (!Rconn) {
ERROR("Failed to connect to /DAREGRESS");
return 0;
}
}
IPropertyTree *parent = parentname.length()?Rconn->queryRoot()->queryPropTree(parentname.str()):Rconn->queryRoot();
if (!parent) {
ERROR1("Failed to connect to %s",parentname.str());
Rconn->Release();
Rconn = NULL;
return 0;
}
__int64 val = parent->getPropInt64("val",0);
parent->setPropInt64("val",n+val);
val = parent->getPropInt64("@val",0);
parent->setPropInt64("@val",m+val);
val = parent->getPropInt64(NULL,0);
parent->setPropInt64(NULL,seed+val);
if (!seed)
return m+n;
if (n==m)
return seed;
if (depth>10)
return seed+n+m;
if (seed%7==n%7)
return n;
if (seed%7==m%7)
return m;
char name[64];
unsigned v = seed;
name[0] = 's';
name[1] = 'u';
name[2] = 'b';
unsigned i = 3;
while (v) {
name[i++] = ('A'+v%26 );
v /= 26;
}
name[i] = 0;
unsigned l = parentname.length();
if (parentname.length())
parentname.append('/');
parentname.append(name);
IPropertyTree *child = parent->queryPropTree(name);
if (!child)
child = parent->addPropTree(name, createPTree(name));
unsigned ret = fn2(fn2(n,seed,seed*17+11,depth+1,parentname),fn2(seed,m,seed*11+17,depth+1,parentname),seed*19+7,depth+1,parentname);
parentname.setLength(l);
return ret;
}