43 #ifndef PROPERTYPTR_HH_
44 #define PROPERTYPTR_HH_
50 #include "BaseProperty.hh"
51 #include "PropertyHandles.hh"
53 #include "../System/MemoryInclude.hh"
55 namespace OpenVolumeMesh {
57 class ResourceManager;
67 template <
class PropT,
class HandleT>
73 typedef typename PropT::value_type value_type;
74 typedef typename PropT::vector_type::const_iterator const_iterator;
75 typedef typename PropT::vector_type::iterator iterator;
76 typedef typename PropT::reference reference;
77 typedef typename PropT::const_reference const_reference;
85 virtual const std::string& name()
const;
87 virtual void delete_element(
size_t _idx);
89 const_iterator begin()
const {
return ptr::shared_ptr<PropT>::get()->begin(); }
90 iterator begin() {
return ptr::shared_ptr<PropT>::get()->begin(); }
92 const_iterator end()
const {
return ptr::shared_ptr<PropT>::get()->end(); }
93 iterator end() {
return ptr::shared_ptr<PropT>::get()->end(); }
95 reference operator[](
size_t _idx) {
return (*ptr::shared_ptr<PropT>::get())[_idx]; }
96 const_reference operator[](
size_t _idx)
const {
return (*ptr::shared_ptr<PropT>::get())[_idx]; }
98 reference operator[](
const OpenVolumeMeshHandle& _h) {
return (*ptr::shared_ptr<PropT>::get())[_h.idx()]; }
99 const_reference operator[](
const OpenVolumeMeshHandle& _h)
const {
return (*ptr::shared_ptr<PropT>::get())[_h.idx()]; }
103 virtual bool persistent()
const {
return ptr::shared_ptr<PropT>::get()->persistent(); }
105 virtual bool anonymous()
const {
return ptr::shared_ptr<PropT>::get()->name().empty(); }
109 virtual void delete_multiple_entries(
const std::vector<bool>& _tags);
111 virtual void resize(
unsigned int _size);
118 #if defined(INCLUDE_TEMPLATES) && !defined(PROPERTYPTRT_CC)
119 #include "PropertyPtrT.cc"