44 #ifndef OPENVOLUMEMESHBASEPROPERTY_HH
45 #define OPENVOLUMEMESHBASEPROPERTY_HH
52 #include "OpenVolumeMeshHandle.hh"
62 namespace OpenVolumeMesh {
68 template <
class PropT,
class HandleT>
friend class PropertyPtr;
76 name_(_name), persistent_(false), handle_(-1) {
80 name_(_rhs.name_), persistent_(_rhs.persistent_), handle_(_rhs.handle_.idx()) {
88 virtual void reserve(
size_t _n) = 0;
91 virtual void resize(
size_t _n) = 0;
94 virtual void clear() = 0;
100 virtual void swap(
size_t _i0,
size_t _i1) = 0;
109 const std::string&
name()
const {
114 virtual void serialize(std::ostream& _ostr)
const {
115 _ostr <<
"\"" << name_ <<
"\"" << std::endl;
119 virtual void deserialize(std::istream& ) {}
122 void set_persistent(
bool _persistent) { persistent_ = _persistent; }
124 bool persistent()
const {
return persistent_; }
139 virtual size_t size_of(
size_t _n_elem)
const {
146 void set_handle(
const OpenVolumeMeshHandle& _handle) { handle_.idx(_handle.idx()); }
159 OpenVolumeMeshHandle handle_;
164 #endif //OPENVOLUMEMESHBASEPROPERTY_HH