43 #define PROPERTYDEFINEST_CC 48 #include "PropertyDefines.hh" 52 template<
typename T,
typename Entity>
53 PropertyTT<T,Entity>::PropertyTT(
const std::string& _name, ResourceManager& _resMan,
PropertyHandleT _handle,
const T _def) :
54 PropertyPtr<OpenVolumeMeshPropertyT<T>,
PropertyHandleT>(new OpenVolumeMeshPropertyT<T>(_name, _def), _resMan, _handle) {
58 template<
typename T,
typename Entity>
59 PropertyTT<T,Entity>::PropertyTT(OpenVolumeMeshPropertyT<T> *_prop, ResourceManager &_resMan,
PropertyHandleT _handle) :
60 PropertyPtr<OpenVolumeMeshPropertyT<T>,
PropertyHandleT>(_prop, _resMan, _handle)
64 template<
typename T,
typename Entity>
65 BaseProperty *PropertyTT<T,Entity>::clone(ResourceManager &_resMan, OpenVolumeMeshHandle _handle)
const 67 auto prop_clone = ptr::shared_ptr<OpenVolumeMeshPropertyT<T>>::get()->clone();
68 return new PropertyTT<T, Entity>(prop_clone, _resMan,
PropertyHandleT(_handle.idx()));
71 template<
typename T,
typename Entity>
72 void PropertyTT<T,Entity>::serialize(std::ostream& _ostr)
const {
73 PropertyPtr<OpenVolumeMeshPropertyT<T>,
PropertyHandleT>::get()->serialize(_ostr);
76 template<
typename T,
typename Entity>
77 void PropertyTT<T,Entity>::deserialize(std::istream& _istr) {
78 PropertyPtr<OpenVolumeMeshPropertyT<T>,
PropertyHandleT>::get()->deserialize(_istr);
83 throw std::runtime_error(
"Serialization is not supported for these data types!");
DLLEXPORT QString typeName(DataType _id)
Get the name of a type with given id.
The property handle, use it to access the properties.