void AttributeWrapper::CreateAttributeValue(STEPattribute * original) { switch (original->NonRefType()) {
case INTEGER_TYPE: integerValue = (int)attribute->Integer(); break; case REAL_TYPE: realValue = (double)*attribute->Real(); break; case NUMBER_TYPE: numberValue = (double)*attribute->Number(); break; case STRING_TYPE: { string value; SDAI_String* sdaiString = attribute->String(); stringValue = marshal_as<String^>(sdaiString->asStr(value)); break; } case ENTITY_TYPE: { SDAI_Application_instance* stepEntity = original->Entity(); const EntityDescriptor* descriptor = stepEntity->getEDesc(); String^ entityType = gcnew String(descriptor->Name()); entityValue = gcnew EntityWrapper(stepEntity->GetFileId(), entityType, &stepEntity->attributes); break; } case SELECT_TYPE: { SDAI_Select* select = original->Select(); BASE_TYPE selectType = select->ValueType(); if (selectType == ENTITY_TYPE) { // How do I get the Entity? } break; }
... other data types...
}
}
Any help would be appreciated. Feel free to correct me if I'm misunderstanding anything, I've only been working with STEP for the past week!
Thanks,
Adam