本文整理汇总了C++中wb_object::bdef方法的典型用法代码示例。如果您正苦于以下问题:C++ wb_object::bdef方法的具体用法?C++ wb_object::bdef怎么用?C++ wb_object::bdef使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wb_object
的用法示例。
在下文中一共展示了wb_object::bdef方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: printBody
//
// printBody
//
void wb_print_wbl::printBody(wb_volume& v,
wb_object& o,
wb_object& templ,
wb_cdef& cdef,
pwr_eBix bix)
{
wb_adef adef;
wb_attribute attr;
wb_attribute tattr;
const char* bname;
char timestr[40] = " ";
int force = 0;
wb_bdef bdef = cdef.bdef(bix);
if (!bdef)
return;
bname = bdef.name();
wb_bdef tbdef = templ.bdef(bix);
if (!tbdef) {
m_errCnt++;
m_os << "Couldn't find template body def for object " << o.name() << endl;
return;
}
if ( m_timeFlag) {
// Get body time
pwr_tTime btime;
switch ( bix) {
case pwr_eBix_rt:
btime = o.rbTime();
// Bugcheck in 4.2 btime can be corrupt
if ( btime.tv_nsec < 0 || btime.tv_nsec >= 1000000000)
break;
strcpy( timestr, " ");
time_AtoAscii( &btime, time_eFormat_DateAndTime, ×tr[1], sizeof(timestr)-1);
break;
case pwr_eBix_dev:
btime = o.dbTime();
strcpy( timestr, " ");
time_AtoAscii( &btime, time_eFormat_DateAndTime, ×tr[1], sizeof(timestr)-1);
break;
default: ;
}
}
indent(1) << "Body " << bdef.name() << timestr << endl;
for (adef = bdef.adef(); adef; adef = adef.next()) {
if ( cdef.cid() == pwr_eClass_Param && strcmp( adef.name(), "Size") == 0) {
// Print Size for Pointers that is not private
wb_attribute flags_attr = o.attribute(bname, "Flags");
pwr_tMask *flagsp = (pwr_tMask *)flags_attr.value();
if (*flagsp & PWR_MASK_POINTER && !(*flagsp & PWR_MASK_PRIVATE))
force = 1;
}
attr = o.attribute(bname, adef.name());
tattr = templ.attribute(bname, adef.name());
// if (tattr == attr)
// continue;
printAttribute(v, attr, tattr, adef, force);
}
indent(-1) << "EndBody" << endl;
return;
}