本文整理汇总了C++中wb_object::sts方法的典型用法代码示例。如果您正苦于以下问题:C++ wb_object::sts方法的具体用法?C++ wb_object::sts怎么用?C++ wb_object::sts使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wb_object
的用法示例。
在下文中一共展示了wb_object::sts方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: syntaxCheckObject
pwr_tStatus wb_volume::syntaxCheckObject(wb_object& o, int *errorcount, int *warningcount)
{
pwr_tStatus sts, csts;
wb_object first, after;
wb_attribute a(o.sts(), o);
sts = triggSyntaxCheck(a, errorcount, warningcount);
if (EVEN(sts)) return sts;
// Get any attribute objects
wb_cdef cd = cdef(o);
if ( !cd) return cd.sts();
wb_bdef bdef = cd.bdef(pwr_eBix_rt);
wb_adef adef;
if ( bdef) {
for (adef = bdef.adef(); adef; adef = adef.next()) {
if ( !(adef.flags() & PWR_MASK_CLASS))
continue;
if ( adef.flags() & PWR_MASK_ARRAY) {
for ( int i = 0; i < adef.nElement(); i++) {
wb_attribute a( adef.sts(), o, adef, i);
csts = syntaxCheckAttr( a, errorcount, warningcount);
if ( EVEN(csts)) sts = csts;
}
}
else {
wb_attribute a( adef.sts(), o, adef);
if ( adef.flags() & PWR_MASK_DISABLEATTR && a.disabled())
continue;
csts = syntaxCheckAttr( a, errorcount, warningcount);
if ( EVEN(csts)) sts = csts;
}
}
}
for ( wb_object c = o.first(); c; c = c.after()) {
if ( c.cid() == pwr_eClass_LibHier)
continue;
csts = syntaxCheckObject(c, errorcount, warningcount);
if ( EVEN(csts))
sts = csts;
}
return sts;
}
示例2: copyObject
wb_object wb_session::copyObject(wb_object o, wb_destination d, wb_name name)
{
wb_orep* orep = 0;
if (isReadonly())
throw wb_error_str("ReadOnlySession");
validateDestination(d, o.cid());
if (evenSts())
throw wb_error(sts());
wb_object parent;
switch (d.code()) {
case ldh_eDest_IntoFirst:
case ldh_eDest_IntoLast:
parent = object(d.oid());
break;
case ldh_eDest_After:
case ldh_eDest_Before:
parent = object(d.oid()).parent();
break;
default:
throw wb_error(LDH__NODEST);
}
m_sts = triggAnteCreate(parent, o.cid());
if (evenSts())
throw wb_error(sts());
m_sts = triggAnteAdopt(parent, o.cid());
if (evenSts())
throw wb_error(sts());
if (m_vrep->vid() == o.vid()) {
orep = m_vrep->copyObject(&m_sts, (wb_orep*)o, d, name);
if (evenSts())
throw wb_error(sts());
orep->ref();
} else {
wb_cdef c = cdef(o.cid());
orep = m_vrep->createObject(&m_sts, c, d, name);
orep->ref();
wb_attribute rba(o.sts(), (wb_orep*)o, "RtBody");
if (rba) {
void* p = rba.value();
wb_attribute rban(m_sts, orep, "RtBody");
writeAttribute(rban, p);
}
wb_attribute dba(o.sts(), (wb_orep*)o, "DevBody");
if (dba) {
void* p = dba.value();
wb_attribute dban(m_sts, orep, "DevBody");
writeAttribute(dban, p);
}
wb_attribute sba(o.sts(), (wb_orep*)o, "SysBody");
if (sba) {
void* p = sba.value();
wb_attribute sban(m_sts, orep, "SysBody");
writeAttribute(sban, p);
}
}
m_srep->update();
wb_object onew = wb_object(m_sts, orep);
orep->unref();
ldh_sEvent* ep = m_srep->eventStart(onew.oid(), ldh_eEvent_ObjectCreated);
m_srep->eventNewFamily(ep, onew);
triggPostCreate(onew);
triggPostAdopt(parent, onew);
m_srep->eventSend(ep);
return onew;
}
示例3:
wb_object::wb_object(const wb_object& x) : wb_status(x.sts()), m_orep(x.m_orep)
{
if (m_orep)
m_orep->ref();
}