本文整理汇总了C++中OID::flags方法的典型用法代码示例。如果您正苦于以下问题:C++ OID::flags方法的具体用法?C++ OID::flags怎么用?C++ OID::flags使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OID
的用法示例。
在下文中一共展示了OID::flags方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: strlen
void VStore::Object::copy(const OID &nobj) {
//OID nobj = OID::create();
OID res, value;
int flags = 0;
Attribute *attrib;
char *dbuf = new char [5000];
char *dbuf2;
DASM *dasm = (DASM*)(root.get("notations").get("dasm"));
for (int i=0; i<m_keys.size(); i++) {
if (m_keys[i] == This) continue;
attrib = Attribute::get(m_oid, m_keys[i]);
if (attrib == 0) {
res = Null;
value = Null;
} else {
flags = attrib->getFlags();
res = attrib->getDefinition();
}
/*if (flags & OID::FLAG_OUT_OF_DATE) {
attrib->setFlags(flags & (0xFF - OID::FLAG_OUT_OF_DATE));
flags = attrib->getFlags();
attrib->setValue(Definition(res).evaluate(m_oid, m_keys[i], false));
value = attrib->getValue();
}*/
if (res != Null) {
//Clone the definition
//value = res;
//res = s_alloc;
//s_alloc++;
//value.copy(res);
//std::cout << "CLONING DEF\n";
dbuf2 = dbuf;
Definition d = res;
nobj.toString(dbuf2, 100);
dbuf2 += strlen(dbuf2);
strcpy(dbuf2, " ");
dbuf2 += strlen(dbuf2);
m_keys[i].toString(dbuf2,100);
dbuf2 += strlen(dbuf2);
if (flags && 0x01) {
//nobj.define(m_keys[i], res, true);
strcpy(dbuf2, " is { ");
dbuf2 += strlen(dbuf2);
} else {
value = attrib->getValue();
//nobj.set(m_keys[i], value, true);
//nobj.definefuture(m_keys[i], res, true);
strcpy(dbuf2, " = ");
dbuf2 += strlen(dbuf2);
value.toString(dbuf2, 100);
dbuf2 += strlen(dbuf2);
strcpy(dbuf2, "\n");
dbuf2 += strlen(dbuf2);
m_keys[i].toString(dbuf2, 100);
dbuf2 += strlen(dbuf2);
strcpy(dbuf2, " := { ");
dbuf2 += strlen(dbuf2);
}
d.toString(dbuf2, 4000);
dbuf2 += strlen(dbuf2);
strcpy(dbuf2, " }\n");
//std::cout << "DBUF: " << dbuf << "\n";
//Execute
dasm->execute(dbuf);
} else {
if (flags && OID::FLAG_DEEP) {
//#ifdef LINUX
//SPINLOCK
//pthread_mutex_lock(&oid_lock);
//#endif
res = s_alloc;
s_alloc++;
//#ifdef LINUX
//SPINLOCK
//pthread_mutex_unlock(&oid_lock);
//#endif
value = attrib->getValue();
value.copy(res);
res.set(This, nobj, true);
nobj.set(m_keys[i], res, true);
} else {
value = attrib->getValue();
if (value != Null) nobj.set(m_keys[i], value, true);
}
nobj.flags(m_keys[i],flags, true);
}
//delete evt;
//.........这里部分代码省略.........