void* ProgramValue::getValues (void) { AttributeValues *attr = NULL; if (m_Context != "CURRENT") { // if (m_TypeString != "CURRENT") { attr = NAU->getObjectAttributes(m_TypeString, m_Context, m_Id); } else { attr = NAU->getCurrentObjectAttributes(m_TypeString, m_Id); } if (attr != NULL) { m_Values = attr->getProp(m_ValueOf, m_ValueType); } // otherwise m_Values will have the default value return m_Values; }
void * Nau::getAttributeValue(std::string type, std::string context, std::string component, int number) { int id; Enums::DataType dt; AttributeValues *attrVal; if (context != "CURRENT") { attrVal = NAU->getObjectAttributes(type, context, number); m_Attributes[type]->getPropTypeAndId(component, &dt, &id); } else { attrVal = NAU->getCurrentObjectAttributes(type, number); m_Attributes[type]->getPropTypeAndId(component, &dt, &id); } if (attrVal == NULL || id == -1) { NAU_THROW("Getting an invalid Attribute\ntype: %s\ncontext: %s\ncomponent: %s", type.c_str(), context.c_str(), component.c_str()); } else return attrVal->getProp(id, dt); }