49 #ifndef OPENMESH_AutoPropertyHandleT_HH 50 #define OPENMESH_AutoPropertyHandleT_HH 62 template <
class Mesh_,
class PropertyHandle_>
67 typedef PropertyHandle_ PropertyHandle;
68 typedef PropertyHandle Base;
69 typedef typename PropertyHandle::Value Value;
78 : m_(NULL), own_property_(
false)
82 : Base(_other.idx()), m_(_other.m_), own_property_(
false)
86 { add_property(_m, _pp_name); }
89 : Base(_pph.idx()), m_(&_m), own_property_(
false)
96 m_->remove_property(*
this);
100 inline void add_property(Mesh& _m,
const std::string& _pp_name = std::string())
104 own_property_ = _pp_name.empty() || !m_->get_property_handle(*
this, _pp_name);
107 m_->add_property(*
this, _pp_name);
111 inline void remove_property()
113 assert(own_property_);
114 m_->remove_property(*
this);
115 own_property_ =
false;
119 template <
class _Handle>
120 inline Value& operator [] (_Handle _hnd)
121 {
return m_->property(*
this, _hnd); }
123 template <
class _Handle>
124 inline const Value& operator [] (_Handle _hnd)
const 125 {
return m_->property(*
this, _hnd); }
127 inline bool own_property()
const 128 {
return own_property_; }
130 inline void free_property()
131 { own_property_ =
false; }
137 #endif // OPENMESH_AutoPropertyHandleT_HH defined Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:64
Definition: AutoPropertyHandleT.hh:63