void FieldContainer::dumpFieldInfo(void) const { const TypeObject &oType = this->getType(); fprintf(stderr, "Dump Container (%s) Field Info\n", oType.getCName()); for(UInt32 i = 1; i <= oType.getNumFieldDescs(); ++i) { FieldDescriptionBase *pDesc = oType.getFieldDesc(i); if(pDesc != NULL) { UInt32 uiTmp = (_bvChanged & pDesc->getFieldMask()) != 0x0000; UInt32 uiTmp1 = 0x0000; fprintf(stderr, WS30" ch : %x\r", uiTmp); uiTmp = (pDesc->getFlags() & Field::FClusterLocal) != 0x0000; uiTmp1 = (_pFieldFlags->_bClusterLocalFlags & pDesc ->getFieldMask() ) == 0x0000; fprintf(stderr, WS30" cl : %x | %x\r", uiTmp, uiTmp1); uiTmp = (pDesc->getFlags() & Field::FThreadLocal) != 0x0000; uiTmp1 = (_pFieldFlags->_bThreadLocalFlags & pDesc ->getFieldMask() ) == 0x0000; fprintf(stderr, WS30" tl : %x | %x\r", uiTmp, uiTmp1); fprintf(stderr, "(%d) : %s :\r", i, pDesc->getCName()); fprintf(stderr, "\n"); #if 0 fprintf(stderr, "0x%016"PRIx64" 0x%016"PRIx64"\n", _pFieldFlags->_bClusterLocalFlags, pDesc ->getFieldMask()); #endif } else { fprintf(stderr, "(%d) : NULL\n", i); } } }
void FieldContainerType::unmarkFieldsClusterLocal(const BitVector bvFieldMasks) { if(_pPrototype != NULL) { BitVector bCurrent = 0x0002; for(UInt32 i = 1; i <= this->getNumFieldDescs(); ++i) { FieldDescriptionBase *pDesc = this->getFieldDesc(i); if(0x0000 != (bCurrent & bvFieldMasks) && pDesc != NULL) { pDesc->setFlags(pDesc->getFlags() & ~Field::FClusterLocal); _pPrototype->_pFieldFlags->_bClusterLocalFlags |= pDesc->getFieldMask(); } bCurrent <<= 1; } } }
bool FieldContainerType::setPrototype(FieldContainer *pPrototype) { bool returnValue = false; if(this->isAbstract() == false) { if(pPrototype != NULL) { TypePredicates::IsBaseOf baseTypePred(pPrototype->getType()); if(baseTypePred(this) == true) { pPrototype->addReferenceUnrecorded(); _pPrototype->subReferenceUnrecorded(); _pPrototype = pPrototype; BitVector bCurrent = 0x0002; for(UInt32 i = 1; i <= this->getNumFieldDescs(); ++i) { FieldDescriptionBase *pDesc = this->getFieldDesc(i); if(pDesc == NULL) continue; if(0x0000 == (bCurrent & _pPrototype->_pFieldFlags->_bThreadLocalFlags)) { pDesc->setFlags(pDesc->getFlags() | Field::FThreadLocal); } else { pDesc->setFlags(pDesc->getFlags() & ~Field::FThreadLocal); } if(0x0000 == (bCurrent & _pPrototype->_pFieldFlags->_bClusterLocalFlags)) { pDesc->setFlags(pDesc->getFlags() | Field::FClusterLocal); } else { pDesc->setFlags(pDesc->getFlags() & ~Field::FClusterLocal); } bCurrent <<= 1; } returnValue = true; } else { FWARNING(("can not set unrelated container of type %s " "as prototype for type %s\n", pPrototype->getType().getCName(), this->getCName())); } } else { FWARNING(("can not delete prototype of a concrete object\n")); } } else { FWARNING(("can not set prototype of an abstract object\n")); } return returnValue; }