35 #define PROPERTYDEFINEST_CC 40 #include "PropertyDefines.hh" 44 template<
typename T,
typename Entity>
45 PropertyTT<T,Entity>::PropertyTT(
const std::string& _name,
const std::string& _internal_type_name, ResourceManager& _resMan,
PropertyHandleT _handle,
const T &_def) :
46 PropertyPtr<OpenVolumeMeshPropertyT<T>, Entity>(new OpenVolumeMeshPropertyT<T>(_name, _internal_type_name, _def), _resMan, _handle) {
50 template<
typename T,
typename Entity>
51 PropertyTT<T,Entity>::PropertyTT(OpenVolumeMeshPropertyT<T> *_prop, ResourceManager &_resMan,
PropertyHandleT _handle) :
52 PropertyPtr<OpenVolumeMeshPropertyT<T>, Entity>(_prop, _resMan, _handle)
56 template<
typename T,
typename Entity>
57 BaseProperty *PropertyTT<T,Entity>::clone(ResourceManager &_resMan, OpenVolumeMeshHandle _handle)
const 59 auto prop_clone = ptr::shared_ptr<OpenVolumeMeshPropertyT<T>>::get()->clone();
60 return new PropertyTT<T, Entity>(prop_clone, _resMan,
PropertyHandleT(_handle.idx()));
65 throw std::runtime_error(
"Serialization is not supported for these data types!");
The property handle, use it to access the properties.
DLLEXPORT QString typeName(DataType _id)
Get the name of a type with given id.