| 19 | } |
| 20 | |
| 21 | void Data::setType(DataTypePtr _value) |
| 22 | { |
| 23 | mType = _value; |
| 24 | |
| 25 | mProperties.clear(); |
| 26 | |
| 27 | if (mType != nullptr) |
| 28 | { |
| 29 | const DataType::VectorProperty& properties = mType->getProperties(); |
| 30 | for (const auto& property : properties) |
| 31 | { |
| 32 | PropertyPtr data = Property::CreateInstance(property, mWeakThis.lock()); |
| 33 | data->initialise(); |
| 34 | |
| 35 | mProperties[property->getName()] = data; |
| 36 | } |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | DataTypePtr Data::getType() const |
| 41 | { |
no test coverage detected