Developer Documentation
OpenVolumeMesh::ResourceManager Class Referenceabstract
Inheritance diagram for OpenVolumeMesh::ResourceManager:
OpenVolumeMesh::TopologyKernel OpenVolumeMesh::GeometryKernel< VecT, TopologyKernelT > OpenVolumeMesh::HexahedralMeshTopologyKernel OpenVolumeMesh::TetrahedralMeshTopologyKernel OpenVolumeMesh::GeometryKernel< VecT, TetrahedralMeshTopologyKernel > OpenVolumeMesh::TetrahedralGeometryKernel< VecT, TopologyKernelT >

Public Types

using Properties = std::set< PropertyStorageBase * >
 

Public Member Functions

 ResourceManager (const ResourceManager &other)
 
ResourceManageroperator= (const ResourceManager &other)
 
 ResourceManager (ResourceManager &&other)=delete
 
ResourceManageroperator= (ResourceManager &&other)=delete
 
void clear_all_props ()
 drop all persistent properties. More...
 
template<typename EntityTag >
void clear_props ()
 drop persistent properties. More...
 
template<typename EntityTag >
size_t n () const
 Get number of entities of given kind in mesh.
 
virtual size_t n_vertices () const =0
 Get number of vertices in mesh. More...
 
virtual size_t n_edges () const =0
 Get number of edges in mesh. More...
 
virtual size_t n_halfedges () const =0
 Get number of halfedges in mesh. More...
 
virtual size_t n_faces () const =0
 Get number of faces in mesh. More...
 
virtual size_t n_halffaces () const =0
 Get number of halffaces in mesh. More...
 
virtual size_t n_cells () const =0
 Get number of cells in mesh. More...
 
template<typename EntityTag >
size_t n_props () const
 number of tracked properties More...
 
template<typename EntityTag >
size_t n_persistent_props () const
 number of persistent properties More...
 
template<typename T , typename EntityTag >
PropertyPtr< T, EntityTag > request_property (const std::string &_name=std::string(), const T _def=T())
 
template<typename T , typename EntityTag >
std::optional< PropertyPtr< T, EntityTag > > create_property (std::string _name=std::string(), const T _def=T())
 
template<typename T , typename EntityTag >
std::optional< PropertyPtr< T, EntityTag > > create_shared_property (std::string _name, const T _def=T())
 
template<typename T , typename EntityTag >
std::optional< PropertyPtr< T, EntityTag > > create_persistent_property (std::string _name, const T _def=T())
 
template<typename T , typename EntityTag >
PropertyPtr< T, EntityTag > create_private_property (std::string _name={}, const T _def=T()) const
 
template<typename T , typename EntityTag >
std::optional< PropertyPtr< T, EntityTag > > get_property (const std::string &_name)
 
template<typename T , typename EntityTag >
std::optional< const PropertyPtr< T, EntityTag > > get_property (const std::string &_name) const
 
template<typename T , typename EntityTag >
bool property_exists (const std::string &_name) const
 
template<typename T , class EntityTag >
void set_persistent (PropertyPtr< T, EntityTag > &_prop, bool _enable=true)
 
template<typename T , class EntityTag >
void set_shared (PropertyPtr< T, EntityTag > &_prop, bool _enable=true)
 
template<typename EntityTag >
PropertyIterator< PersistentProperties::const_iterator > persistent_props_begin () const
 
template<typename EntityTag >
PropertyIterator< PersistentProperties::const_iterator > persistent_props_end () const
 
void clear_vertex_props ()
 convenience functions: More...
 
void clear_edge_props ()
 
void clear_halfedge_props ()
 
void clear_face_props ()
 
void clear_halfface_props ()
 
void clear_cell_props ()
 
void clear_mesh_props ()
 
template<class T >
VertexPropertyT< T > request_vertex_property (const std::string &_name=std::string(), const T _def=T())
 
template<class T >
EdgePropertyT< T > request_edge_property (const std::string &_name=std::string(), const T _def=T())
 
template<class T >
HalfEdgePropertyT< T > request_halfedge_property (const std::string &_name=std::string(), const T _def=T())
 
template<class T >
FacePropertyT< T > request_face_property (const std::string &_name=std::string(), const T _def=T())
 
template<class T >
HalfFacePropertyT< T > request_halfface_property (const std::string &_name=std::string(), const T _def=T())
 
template<class T >
CellPropertyT< T > request_cell_property (const std::string &_name=std::string(), const T _def=T())
 
template<class T >
MeshPropertyT< T > request_mesh_property (const std::string &_name=std::string(), const T _def=T())
 
size_t n_vertex_props () const
 
auto vertex_props_begin () const
 
auto vertex_props_end () const
 
template<typename T >
std::optional< VertexPropertyPtr< T > > create_shared_vertex_property (std::string _name, const T _def=T())
 
template<typename T >
std::optional< VertexPropertyPtr< T > > create_persistent_vertex_property (std::string _name, const T _def=T())
 
template<typename T >
VertexPropertyPtr< T > create_private_vertex_property (std::string _name={}, const T _def=T()) const
 
template<typename T >
std::optional< VertexPropertyPtr< T > > get_vertex_property (const std::string &_name)
 
template<typename T >
std::optional< const VertexPropertyPtr< T > > get_vertex_property (const std::string &_name) const
 
template<class T >
bool vertex_property_exists (const std::string &_name) const
 
size_t n_edge_props () const
 
auto edge_props_begin () const
 
auto edge_props_end () const
 
template<typename T >
std::optional< EdgePropertyPtr< T > > create_shared_edge_property (std::string _name, const T _def=T())
 
template<typename T >
std::optional< EdgePropertyPtr< T > > create_persistent_edge_property (std::string _name, const T _def=T())
 
template<typename T >
EdgePropertyPtr< T > create_private_edge_property (std::string _name={}, const T _def=T()) const
 
template<typename T >
std::optional< EdgePropertyPtr< T > > get_edge_property (const std::string &_name)
 
template<typename T >
std::optional< const EdgePropertyPtr< T > > get_edge_property (const std::string &_name) const
 
template<class T >
bool edge_property_exists (const std::string &_name) const
 
size_t n_halfedge_props () const
 
auto halfedge_props_begin () const
 
auto halfedge_props_end () const
 
template<typename T >
std::optional< HalfEdgePropertyPtr< T > > create_shared_halfedge_property (std::string _name, const T _def=T())
 
template<typename T >
std::optional< HalfEdgePropertyPtr< T > > create_persistent_halfedge_property (std::string _name, const T _def=T())
 
template<typename T >
HalfEdgePropertyPtr< T > create_private_halfedge_property (std::string _name={}, const T _def=T()) const
 
template<typename T >
std::optional< HalfEdgePropertyPtr< T > > get_halfedge_property (const std::string &_name)
 
template<typename T >
std::optional< const HalfEdgePropertyPtr< T > > get_halfedge_property (const std::string &_name) const
 
template<class T >
bool halfedge_property_exists (const std::string &_name) const
 
size_t n_face_props () const
 
auto face_props_begin () const
 
auto face_props_end () const
 
template<typename T >
std::optional< FacePropertyPtr< T > > create_shared_face_property (std::string _name, const T _def=T())
 
template<typename T >
std::optional< FacePropertyPtr< T > > create_persistent_face_property (std::string _name, const T _def=T())
 
template<typename T >
FacePropertyPtr< T > create_private_face_property (std::string _name={}, const T _def=T()) const
 
template<typename T >
std::optional< FacePropertyPtr< T > > get_face_property (const std::string &_name)
 
template<typename T >
std::optional< const FacePropertyPtr< T > > get_face_property (const std::string &_name) const
 
template<class T >
bool face_property_exists (const std::string &_name) const
 
size_t n_halfface_props () const
 
auto halfface_props_begin () const
 
auto halfface_props_end () const
 
template<typename T >
std::optional< HalfFacePropertyPtr< T > > create_shared_halfface_property (std::string _name, const T _def=T())
 
template<typename T >
std::optional< HalfFacePropertyPtr< T > > create_persistent_halfface_property (std::string _name, const T _def=T())
 
template<typename T >
HalfFacePropertyPtr< T > create_private_halfface_property (std::string _name={}, const T _def=T()) const
 
template<typename T >
std::optional< HalfFacePropertyPtr< T > > get_halfface_property (const std::string &_name)
 
template<typename T >
std::optional< const HalfFacePropertyPtr< T > > get_halfface_property (const std::string &_name) const
 
template<class T >
bool halfface_property_exists (const std::string &_name) const
 
size_t n_cell_props () const
 
auto cell_props_begin () const
 
auto cell_props_end () const
 
template<typename T >
std::optional< CellPropertyPtr< T > > create_shared_cell_property (std::string _name, const T _def=T())
 
template<typename T >
std::optional< CellPropertyPtr< T > > create_persistent_cell_property (std::string _name, const T _def=T())
 
template<typename T >
CellPropertyPtr< T > create_private_cell_property (std::string _name={}, const T _def=T()) const
 
template<typename T >
std::optional< CellPropertyPtr< T > > get_cell_property (const std::string &_name)
 
template<typename T >
std::optional< const CellPropertyPtr< T > > get_cell_property (const std::string &_name) const
 
template<class T >
bool cell_property_exists (const std::string &_name) const
 

Protected Member Functions

template<typename EntityTag >
detail::Tracker< PropertyStorageBase > & storage_tracker () const
 
detail::Tracker< PropertyStorageBase > & storage_tracker (EntityType type) const
 
void resize_vprops (size_t _nv)
 Change size of stored vertex properties. More...
 
void resize_eprops (size_t _ne)
 Change size of stored edge properties. More...
 
void resize_fprops (size_t _nf)
 Change size of stored face properties. More...
 
void resize_cprops (size_t _nc)
 Change size of stored cell properties. More...
 
void reserve_vprops (size_t n)
 
void reserve_eprops (size_t n)
 
void reserve_fprops (size_t n)
 
void reserve_cprops (size_t n)
 
void vertex_deleted (const VertexHandle &_h)
 
void edge_deleted (const EdgeHandle &_h)
 
void face_deleted (const FaceHandle &_h)
 
void cell_deleted (const CellHandle &_h)
 
template<typename Handle >
void swap_property_elements (Handle _idx_a, Handle _idx_b)
 
template<typename Handle >
void copy_property_elements (Handle _idx_a, Handle _idx_b)
 

Protected Attributes

PerEntity< detail::Tracker< PropertyStorageBase > > storage_trackers_
 

Private Types

using PersistentProperties = std::set< std::shared_ptr< PropertyStorageBase > >
 

Private Member Functions

template<class EntityTag >
void resize_props (size_t _n)
 
template<class EntityTag >
void reserve_props (size_t _n)
 
template<class Handle >
void entity_deleted (Handle)
 
template<typename T , typename EntityTag >
std::optional< PropertyPtr< T, EntityTag > > internal_find_property (const std::string &_name) const
 
template<typename T , typename EntityTag >
PropertyPtr< T, EntityTag > internal_create_property (std::string _name, const T _def, bool shared) const
 
void clone_persistent_properties_from (ResourceManager const &)
 

Static Private Member Functions

template<class T , typename EntityTag >
static PropertyPtr< T, EntityTag > prop_ptr_from_storage (PropertyStorageBase *_prop)
 

Private Attributes

PerEntity< PersistentProperties > persistent_props_
 

Friends

class PropertyStorageBase
 

Detailed Description

Definition at line 58 of file ResourceManager.hh.

Member Typedef Documentation

◆ PersistentProperties

using OpenVolumeMesh::ResourceManager::PersistentProperties = std::set<std::shared_ptr<PropertyStorageBase> >
private

Definition at line 73 of file ResourceManager.hh.

◆ Properties

using OpenVolumeMesh::ResourceManager::Properties = std::set<PropertyStorageBase*>

Definition at line 61 of file ResourceManager.hh.

Constructor & Destructor Documentation

◆ ResourceManager()

OpenVolumeMesh::ResourceManager::ResourceManager ( const ResourceManager other)

Definition at line 39 of file ResourceManager.cc.

Member Function Documentation

◆ cell_deleted()

void OpenVolumeMesh::ResourceManager::cell_deleted ( const CellHandle _h)
protected

Definition at line 144 of file ResourceManager.cc.

◆ cell_property_exists()

template<class T >
bool OpenVolumeMesh::ResourceManager::cell_property_exists ( const std::string &  _name) const
inline

Definition at line 524 of file ResourceManager.hh.

◆ cell_props_begin()

auto OpenVolumeMesh::ResourceManager::cell_props_begin ( ) const
inline

Definition at line 488 of file ResourceManager.hh.

◆ cell_props_end()

auto OpenVolumeMesh::ResourceManager::cell_props_end ( ) const
inline

Definition at line 489 of file ResourceManager.hh.

◆ clear_all_props()

void OpenVolumeMesh::ResourceManager::clear_all_props ( )

drop all persistent properties.

Definition at line 148 of file ResourceManager.cc.

◆ clear_cell_props()

void OpenVolumeMesh::ResourceManager::clear_cell_props ( )
inline

Definition at line 235 of file ResourceManager.hh.

◆ clear_edge_props()

void OpenVolumeMesh::ResourceManager::clear_edge_props ( )
inline

Definition at line 231 of file ResourceManager.hh.

◆ clear_face_props()

void OpenVolumeMesh::ResourceManager::clear_face_props ( )
inline

Definition at line 233 of file ResourceManager.hh.

◆ clear_halfedge_props()

void OpenVolumeMesh::ResourceManager::clear_halfedge_props ( )
inline

Definition at line 232 of file ResourceManager.hh.

◆ clear_halfface_props()

void OpenVolumeMesh::ResourceManager::clear_halfface_props ( )
inline

Definition at line 234 of file ResourceManager.hh.

◆ clear_mesh_props()

void OpenVolumeMesh::ResourceManager::clear_mesh_props ( )
inline

Definition at line 236 of file ResourceManager.hh.

◆ clear_props()

template<typename EntityTag >
void OpenVolumeMesh::ResourceManager::clear_props

drop persistent properties.

Definition at line 56 of file ResourceManagerT_impl.hh.

◆ clear_vertex_props()

void OpenVolumeMesh::ResourceManager::clear_vertex_props ( )
inline

convenience functions:

Definition at line 230 of file ResourceManager.hh.

◆ clone_persistent_properties_from()

void OpenVolumeMesh::ResourceManager::clone_persistent_properties_from ( ResourceManager const &  other)
private

Definition at line 72 of file ResourceManager.cc.

◆ copy_property_elements()

template<typename Handle >
void OpenVolumeMesh::ResourceManager::copy_property_elements ( Handle  _idx_a,
Handle  _idx_b 
)
protected

Definition at line 78 of file ResourceManagerT_impl.hh.

◆ create_persistent_cell_property()

template<typename T >
std::optional< CellPropertyPtr< T > > OpenVolumeMesh::ResourceManager::create_persistent_cell_property ( std::string  _name,
const T  _def = T() 
)
inline

Create new shared + persistent cell property: if the property already exists, return no value.

Definition at line 500 of file ResourceManager.hh.

◆ create_persistent_edge_property()

template<typename T >
std::optional< EdgePropertyPtr< T > > OpenVolumeMesh::ResourceManager::create_persistent_edge_property ( std::string  _name,
const T  _def = T() 
)
inline

Create new shared + persistent edge property: if the property already exists, return no value.

Definition at line 312 of file ResourceManager.hh.

◆ create_persistent_face_property()

template<typename T >
std::optional< FacePropertyPtr< T > > OpenVolumeMesh::ResourceManager::create_persistent_face_property ( std::string  _name,
const T  _def = T() 
)
inline

Create new shared + persistent face property: if the property already exists, return no value.

Definition at line 406 of file ResourceManager.hh.

◆ create_persistent_halfedge_property()

template<typename T >
std::optional< HalfEdgePropertyPtr< T > > OpenVolumeMesh::ResourceManager::create_persistent_halfedge_property ( std::string  _name,
const T  _def = T() 
)
inline

Create new shared + persistent halfedge property: if the property already exists, return no value.

Definition at line 359 of file ResourceManager.hh.

◆ create_persistent_halfface_property()

template<typename T >
std::optional< HalfFacePropertyPtr< T > > OpenVolumeMesh::ResourceManager::create_persistent_halfface_property ( std::string  _name,
const T  _def = T() 
)
inline

Create new shared + persistent halfface property: if the property already exists, return no value.

Definition at line 453 of file ResourceManager.hh.

◆ create_persistent_property()

template<typename T , typename EntityTag >
std::optional< PropertyPtr< T, EntityTag > > OpenVolumeMesh::ResourceManager::create_persistent_property ( std::string  _name,
const T  _def = T() 
)

Create new shared + persistent property: if the property already exists, return no value.

Definition at line 175 of file ResourceManagerT_impl.hh.

◆ create_persistent_vertex_property()

template<typename T >
std::optional< VertexPropertyPtr< T > > OpenVolumeMesh::ResourceManager::create_persistent_vertex_property ( std::string  _name,
const T  _def = T() 
)
inline

Create new shared + persistent vertex property: if the property already exists, return no value.

Definition at line 265 of file ResourceManager.hh.

◆ create_private_cell_property()

template<typename T >
CellPropertyPtr< T > OpenVolumeMesh::ResourceManager::create_private_cell_property ( std::string  _name = {},
const T  _def = T() 
) const
inline

Create private cell property - useful for const meshes

Definition at line 506 of file ResourceManager.hh.

◆ create_private_edge_property()

template<typename T >
EdgePropertyPtr< T > OpenVolumeMesh::ResourceManager::create_private_edge_property ( std::string  _name = {},
const T  _def = T() 
) const
inline

Create private edge property - useful for const meshes

Definition at line 318 of file ResourceManager.hh.

◆ create_private_face_property()

template<typename T >
FacePropertyPtr< T > OpenVolumeMesh::ResourceManager::create_private_face_property ( std::string  _name = {},
const T  _def = T() 
) const
inline

Create private face property - useful for const meshes

Definition at line 412 of file ResourceManager.hh.

◆ create_private_halfedge_property()

template<typename T >
HalfEdgePropertyPtr< T > OpenVolumeMesh::ResourceManager::create_private_halfedge_property ( std::string  _name = {},
const T  _def = T() 
) const
inline

Create private halfedge property - useful for const meshes

Definition at line 365 of file ResourceManager.hh.

◆ create_private_halfface_property()

template<typename T >
HalfFacePropertyPtr< T > OpenVolumeMesh::ResourceManager::create_private_halfface_property ( std::string  _name = {},
const T  _def = T() 
) const
inline

Create private halfface property - useful for const meshes

Definition at line 459 of file ResourceManager.hh.

◆ create_private_property()

template<typename T , typename EntityTag >
PropertyPtr< T, EntityTag > OpenVolumeMesh::ResourceManager::create_private_property ( std::string  _name = {},
const T  _def = T() 
) const

Create private property - useful for const meshes

Definition at line 196 of file ResourceManagerT_impl.hh.

◆ create_private_vertex_property()

template<typename T >
VertexPropertyPtr< T > OpenVolumeMesh::ResourceManager::create_private_vertex_property ( std::string  _name = {},
const T  _def = T() 
) const
inline

Create private vertex property - useful for const meshes

Definition at line 271 of file ResourceManager.hh.

◆ create_property()

template<typename T , typename EntityTag >
std::optional< PropertyPtr< T, EntityTag > > OpenVolumeMesh::ResourceManager::create_property ( std::string  _name = std::string(),
const T  _def = T() 
)

Create new property: if the property already exists, return no value.

◆ create_shared_cell_property()

template<typename T >
std::optional< CellPropertyPtr< T > > OpenVolumeMesh::ResourceManager::create_shared_cell_property ( std::string  _name,
const T  _def = T() 
)
inline

Create new shared cell property: if the property already exists, return no value.

Definition at line 494 of file ResourceManager.hh.

◆ create_shared_edge_property()

template<typename T >
std::optional< EdgePropertyPtr< T > > OpenVolumeMesh::ResourceManager::create_shared_edge_property ( std::string  _name,
const T  _def = T() 
)
inline

Create new shared edge property: if the property already exists, return no value.

Definition at line 306 of file ResourceManager.hh.

◆ create_shared_face_property()

template<typename T >
std::optional< FacePropertyPtr< T > > OpenVolumeMesh::ResourceManager::create_shared_face_property ( std::string  _name,
const T  _def = T() 
)
inline

Create new shared face property: if the property already exists, return no value.

Definition at line 400 of file ResourceManager.hh.

◆ create_shared_halfedge_property()

template<typename T >
std::optional< HalfEdgePropertyPtr< T > > OpenVolumeMesh::ResourceManager::create_shared_halfedge_property ( std::string  _name,
const T  _def = T() 
)
inline

Create new shared halfedge property: if the property already exists, return no value.

Definition at line 353 of file ResourceManager.hh.

◆ create_shared_halfface_property()

template<typename T >
std::optional< HalfFacePropertyPtr< T > > OpenVolumeMesh::ResourceManager::create_shared_halfface_property ( std::string  _name,
const T  _def = T() 
)
inline

Create new shared halfface property: if the property already exists, return no value.

Definition at line 447 of file ResourceManager.hh.

◆ create_shared_property()

template<typename T , typename EntityTag >
std::optional< PropertyPtr< T, EntityTag > > OpenVolumeMesh::ResourceManager::create_shared_property ( std::string  _name,
const T  _def = T() 
)

Create new shared property: if the property already exists, return no value.

Definition at line 187 of file ResourceManagerT_impl.hh.

◆ create_shared_vertex_property()

template<typename T >
std::optional< VertexPropertyPtr< T > > OpenVolumeMesh::ResourceManager::create_shared_vertex_property ( std::string  _name,
const T  _def = T() 
)
inline

Create new shared vertex property: if the property already exists, return no value.

Definition at line 259 of file ResourceManager.hh.

◆ edge_deleted()

void OpenVolumeMesh::ResourceManager::edge_deleted ( const EdgeHandle _h)
protected

Definition at line 131 of file ResourceManager.cc.

◆ edge_property_exists()

template<class T >
bool OpenVolumeMesh::ResourceManager::edge_property_exists ( const std::string &  _name) const
inline

Definition at line 336 of file ResourceManager.hh.

◆ edge_props_begin()

auto OpenVolumeMesh::ResourceManager::edge_props_begin ( ) const
inline

Definition at line 300 of file ResourceManager.hh.

◆ edge_props_end()

auto OpenVolumeMesh::ResourceManager::edge_props_end ( ) const
inline

Definition at line 301 of file ResourceManager.hh.

◆ entity_deleted()

template<typename Handle >
void OpenVolumeMesh::ResourceManager::entity_deleted ( Handle  _h)
private

Definition at line 274 of file ResourceManagerT_impl.hh.

◆ face_deleted()

void OpenVolumeMesh::ResourceManager::face_deleted ( const FaceHandle _h)
protected

Definition at line 137 of file ResourceManager.cc.

◆ face_property_exists()

template<class T >
bool OpenVolumeMesh::ResourceManager::face_property_exists ( const std::string &  _name) const
inline

Definition at line 430 of file ResourceManager.hh.

◆ face_props_begin()

auto OpenVolumeMesh::ResourceManager::face_props_begin ( ) const
inline

Definition at line 394 of file ResourceManager.hh.

◆ face_props_end()

auto OpenVolumeMesh::ResourceManager::face_props_end ( ) const
inline

Definition at line 395 of file ResourceManager.hh.

◆ get_cell_property() [1/2]

template<typename T >
std::optional< CellPropertyPtr< T > > OpenVolumeMesh::ResourceManager::get_cell_property ( const std::string &  _name)
inline

Get existing shared cell property. If the property does not exist, return no value.

Definition at line 512 of file ResourceManager.hh.

◆ get_cell_property() [2/2]

template<typename T >
std::optional< const CellPropertyPtr< T > > OpenVolumeMesh::ResourceManager::get_cell_property ( const std::string &  _name) const
inline

Get a const view on an existing shared cell property. If the property does not exist, return no value.

Definition at line 519 of file ResourceManager.hh.

◆ get_edge_property() [1/2]

template<typename T >
std::optional< EdgePropertyPtr< T > > OpenVolumeMesh::ResourceManager::get_edge_property ( const std::string &  _name)
inline

Get existing shared edge property. If the property does not exist, return no value.

Definition at line 324 of file ResourceManager.hh.

◆ get_edge_property() [2/2]

template<typename T >
std::optional< const EdgePropertyPtr< T > > OpenVolumeMesh::ResourceManager::get_edge_property ( const std::string &  _name) const
inline

Get a const view on an existing shared edge property. If the property does not exist, return no value.

Definition at line 331 of file ResourceManager.hh.

◆ get_face_property() [1/2]

template<typename T >
std::optional< FacePropertyPtr< T > > OpenVolumeMesh::ResourceManager::get_face_property ( const std::string &  _name)
inline

Get existing shared face property. If the property does not exist, return no value.

Definition at line 418 of file ResourceManager.hh.

◆ get_face_property() [2/2]

template<typename T >
std::optional< const FacePropertyPtr< T > > OpenVolumeMesh::ResourceManager::get_face_property ( const std::string &  _name) const
inline

Get a const view on an existing shared face property. If the property does not exist, return no value.

Definition at line 425 of file ResourceManager.hh.

◆ get_halfedge_property() [1/2]

template<typename T >
std::optional< HalfEdgePropertyPtr< T > > OpenVolumeMesh::ResourceManager::get_halfedge_property ( const std::string &  _name)
inline

Get existing shared halfedge property. If the property does not exist, return no value.

Definition at line 371 of file ResourceManager.hh.

◆ get_halfedge_property() [2/2]

template<typename T >
std::optional< const HalfEdgePropertyPtr< T > > OpenVolumeMesh::ResourceManager::get_halfedge_property ( const std::string &  _name) const
inline

Get a const view on an existing shared halfedge property. If the property does not exist, return no value.

Definition at line 378 of file ResourceManager.hh.

◆ get_halfface_property() [1/2]

template<typename T >
std::optional< HalfFacePropertyPtr< T > > OpenVolumeMesh::ResourceManager::get_halfface_property ( const std::string &  _name)
inline

Get existing shared halfface property. If the property does not exist, return no value.

Definition at line 465 of file ResourceManager.hh.

◆ get_halfface_property() [2/2]

template<typename T >
std::optional< const HalfFacePropertyPtr< T > > OpenVolumeMesh::ResourceManager::get_halfface_property ( const std::string &  _name) const
inline

Get a const view on an existing shared halfface property. If the property does not exist, return no value.

Definition at line 472 of file ResourceManager.hh.

◆ get_property() [1/2]

template<typename T , typename EntityTag >
std::optional< PropertyPtr< T, EntityTag > > OpenVolumeMesh::ResourceManager::get_property ( const std::string &  _name)

Get existing shared property. If the property does not exist, return no value.

Definition at line 203 of file ResourceManagerT_impl.hh.

◆ get_property() [2/2]

template<typename T , typename EntityTag >
std::optional< const PropertyPtr< T, EntityTag > > OpenVolumeMesh::ResourceManager::get_property ( const std::string &  _name) const

Get a const view on an existing shared property. If the property does not exist, return no value.

Definition at line 210 of file ResourceManagerT_impl.hh.

◆ get_vertex_property() [1/2]

template<typename T >
std::optional< VertexPropertyPtr< T > > OpenVolumeMesh::ResourceManager::get_vertex_property ( const std::string &  _name)
inline

Get existing shared vertex property. If the property does not exist, return no value.

Definition at line 277 of file ResourceManager.hh.

◆ get_vertex_property() [2/2]

template<typename T >
std::optional< const VertexPropertyPtr< T > > OpenVolumeMesh::ResourceManager::get_vertex_property ( const std::string &  _name) const
inline

Get a const view on an existing shared vertex property. If the property does not exist, return no value.

Definition at line 284 of file ResourceManager.hh.

◆ halfedge_property_exists()

template<class T >
bool OpenVolumeMesh::ResourceManager::halfedge_property_exists ( const std::string &  _name) const
inline

Definition at line 383 of file ResourceManager.hh.

◆ halfedge_props_begin()

auto OpenVolumeMesh::ResourceManager::halfedge_props_begin ( ) const
inline

Definition at line 347 of file ResourceManager.hh.

◆ halfedge_props_end()

auto OpenVolumeMesh::ResourceManager::halfedge_props_end ( ) const
inline

Definition at line 348 of file ResourceManager.hh.

◆ halfface_property_exists()

template<class T >
bool OpenVolumeMesh::ResourceManager::halfface_property_exists ( const std::string &  _name) const
inline

Definition at line 477 of file ResourceManager.hh.

◆ halfface_props_begin()

auto OpenVolumeMesh::ResourceManager::halfface_props_begin ( ) const
inline

Definition at line 441 of file ResourceManager.hh.

◆ halfface_props_end()

auto OpenVolumeMesh::ResourceManager::halfface_props_end ( ) const
inline

Definition at line 442 of file ResourceManager.hh.

◆ internal_create_property()

template<class T , class EntityTag >
PropertyPtr< T, EntityTag > OpenVolumeMesh::ResourceManager::internal_create_property ( std::string  _name,
const T  _def,
bool  shared 
) const
private

Definition at line 150 of file ResourceManagerT_impl.hh.

◆ internal_find_property()

template<typename T , typename EntityTag >
std::optional< PropertyPtr< T, EntityTag > > OpenVolumeMesh::ResourceManager::internal_find_property ( const std::string &  _name) const
private

Definition at line 129 of file ResourceManagerT_impl.hh.

◆ n_cell_props()

size_t OpenVolumeMesh::ResourceManager::n_cell_props ( ) const
inline

Definition at line 487 of file ResourceManager.hh.

◆ n_cells()

virtual size_t OpenVolumeMesh::ResourceManager::n_cells ( ) const
pure virtual

Get number of cells in mesh.

Implemented in OpenVolumeMesh::TopologyKernel.

◆ n_edge_props()

size_t OpenVolumeMesh::ResourceManager::n_edge_props ( ) const
inline

Definition at line 299 of file ResourceManager.hh.

◆ n_edges()

virtual size_t OpenVolumeMesh::ResourceManager::n_edges ( ) const
pure virtual

Get number of edges in mesh.

Implemented in OpenVolumeMesh::TopologyKernel.

◆ n_face_props()

size_t OpenVolumeMesh::ResourceManager::n_face_props ( ) const
inline

Definition at line 393 of file ResourceManager.hh.

◆ n_faces()

virtual size_t OpenVolumeMesh::ResourceManager::n_faces ( ) const
pure virtual

Get number of faces in mesh.

Implemented in OpenVolumeMesh::TopologyKernel.

◆ n_halfedge_props()

size_t OpenVolumeMesh::ResourceManager::n_halfedge_props ( ) const
inline

Definition at line 346 of file ResourceManager.hh.

◆ n_halfedges()

virtual size_t OpenVolumeMesh::ResourceManager::n_halfedges ( ) const
pure virtual

Get number of halfedges in mesh.

Implemented in OpenVolumeMesh::TopologyKernel.

◆ n_halfface_props()

size_t OpenVolumeMesh::ResourceManager::n_halfface_props ( ) const
inline

Definition at line 440 of file ResourceManager.hh.

◆ n_halffaces()

virtual size_t OpenVolumeMesh::ResourceManager::n_halffaces ( ) const
pure virtual

Get number of halffaces in mesh.

Implemented in OpenVolumeMesh::TopologyKernel.

◆ n_persistent_props()

template<typename EntityTag >
size_t OpenVolumeMesh::ResourceManager::n_persistent_props

number of persistent properties

Definition at line 289 of file ResourceManagerT_impl.hh.

◆ n_props()

template<typename EntityTag >
size_t OpenVolumeMesh::ResourceManager::n_props

number of tracked properties

Definition at line 284 of file ResourceManagerT_impl.hh.

◆ n_vertex_props()

size_t OpenVolumeMesh::ResourceManager::n_vertex_props ( ) const
inline

Definition at line 252 of file ResourceManager.hh.

◆ n_vertices()

virtual size_t OpenVolumeMesh::ResourceManager::n_vertices ( ) const
pure virtual

Get number of vertices in mesh.

Implemented in OpenVolumeMesh::TopologyKernel.

◆ operator=()

ResourceManager & OpenVolumeMesh::ResourceManager::operator= ( const ResourceManager other)

This turns all existing properties on the mesh into private properties, i.e., they can not be found via the mesh API anymore. However, properties in use (i.e. with a PropertyPtr) are resized to fit the new n_"entity" value and continue to work. Be aware that their contents might be semantically wrong for the mesh after assignment.

Definition at line 54 of file ResourceManager.cc.

◆ persistent_props_begin()

template<typename EntityTag >
PropertyIterator< PersistentProperties::const_iterator > OpenVolumeMesh::ResourceManager::persistent_props_begin ( ) const
inline

Definition at line 219 of file ResourceManager.hh.

◆ persistent_props_end()

template<typename EntityTag >
PropertyIterator< PersistentProperties::const_iterator > OpenVolumeMesh::ResourceManager::persistent_props_end ( ) const
inline

Definition at line 224 of file ResourceManager.hh.

◆ prop_ptr_from_storage()

template<class T , typename EntityTag >
PropertyPtr< T, EntityTag > OpenVolumeMesh::ResourceManager::prop_ptr_from_storage ( PropertyStorageBase _prop)
staticprivate

Definition at line 359 of file ResourceManagerT_impl.hh.

◆ property_exists()

template<typename T , typename EntityTag >
bool OpenVolumeMesh::ResourceManager::property_exists ( const std::string &  _name) const
inline

Definition at line 205 of file ResourceManager.hh.

◆ request_cell_property()

template<class T >
CellPropertyT< T > OpenVolumeMesh::ResourceManager::request_cell_property ( const std::string &  _name = std::string(),
const T  _def = T() 
)

Definition at line 116 of file ResourceManagerT_impl.hh.

◆ request_edge_property()

template<class T >
EdgePropertyT< T > OpenVolumeMesh::ResourceManager::request_edge_property ( const std::string &  _name = std::string(),
const T  _def = T() 
)

Definition at line 93 of file ResourceManagerT_impl.hh.

◆ request_face_property()

template<class T >
FacePropertyT< T > OpenVolumeMesh::ResourceManager::request_face_property ( const std::string &  _name = std::string(),
const T  _def = T() 
)

Definition at line 105 of file ResourceManagerT_impl.hh.

◆ request_halfedge_property()

template<class T >
HalfEdgePropertyT< T > OpenVolumeMesh::ResourceManager::request_halfedge_property ( const std::string &  _name = std::string(),
const T  _def = T() 
)

Definition at line 99 of file ResourceManagerT_impl.hh.

◆ request_halfface_property()

template<class T >
HalfFacePropertyT< T > OpenVolumeMesh::ResourceManager::request_halfface_property ( const std::string &  _name = std::string(),
const T  _def = T() 
)

Definition at line 111 of file ResourceManagerT_impl.hh.

◆ request_mesh_property()

template<class T >
MeshPropertyT< T > OpenVolumeMesh::ResourceManager::request_mesh_property ( const std::string &  _name = std::string(),
const T  _def = T() 
)

Definition at line 122 of file ResourceManagerT_impl.hh.

◆ request_property()

template<typename T , typename EntityTag >
PropertyPtr< T, EntityTag > OpenVolumeMesh::ResourceManager::request_property ( const std::string &  _name = std::string(),
const T  _def = T() 
)

Get or create property: if the property does not exist yet, create it. If it has an empty name, it will be a private property, otherwise shared.

Definition at line 164 of file ResourceManagerT_impl.hh.

◆ request_vertex_property()

template<class T >
VertexPropertyT< T > OpenVolumeMesh::ResourceManager::request_vertex_property ( const std::string &  _name = std::string(),
const T  _def = T() 
)

Definition at line 87 of file ResourceManagerT_impl.hh.

◆ reserve_cprops()

void OpenVolumeMesh::ResourceManager::reserve_cprops ( size_t  n)
protected

Definition at line 122 of file ResourceManager.cc.

◆ reserve_eprops()

void OpenVolumeMesh::ResourceManager::reserve_eprops ( size_t  n)
protected

Definition at line 114 of file ResourceManager.cc.

◆ reserve_fprops()

void OpenVolumeMesh::ResourceManager::reserve_fprops ( size_t  n)
protected

Definition at line 118 of file ResourceManager.cc.

◆ reserve_props()

template<class EntityTag >
void OpenVolumeMesh::ResourceManager::reserve_props ( size_t  _n)
private

Definition at line 264 of file ResourceManagerT_impl.hh.

◆ reserve_vprops()

void OpenVolumeMesh::ResourceManager::reserve_vprops ( size_t  n)
protected

Definition at line 111 of file ResourceManager.cc.

◆ resize_cprops()

void OpenVolumeMesh::ResourceManager::resize_cprops ( size_t  _nc)
protected

Change size of stored cell properties.

Definition at line 107 of file ResourceManager.cc.

◆ resize_eprops()

void OpenVolumeMesh::ResourceManager::resize_eprops ( size_t  _ne)
protected

Change size of stored edge properties.

Definition at line 97 of file ResourceManager.cc.

◆ resize_fprops()

void OpenVolumeMesh::ResourceManager::resize_fprops ( size_t  _nf)
protected

Change size of stored face properties.

Definition at line 102 of file ResourceManager.cc.

◆ resize_props()

template<class EntityTag >
void OpenVolumeMesh::ResourceManager::resize_props ( size_t  _n)
private

Definition at line 255 of file ResourceManagerT_impl.hh.

◆ resize_vprops()

void OpenVolumeMesh::ResourceManager::resize_vprops ( size_t  _nv)
protected

Change size of stored vertex properties.

Definition at line 93 of file ResourceManager.cc.

◆ set_persistent()

template<typename T , class EntityTag >
void OpenVolumeMesh::ResourceManager::set_persistent ( PropertyPtr< T, EntityTag > &  _prop,
bool  _enable = true 
)

Definition at line 237 of file ResourceManagerT_impl.hh.

◆ set_shared()

template<typename T , class EntityTag >
void OpenVolumeMesh::ResourceManager::set_shared ( PropertyPtr< T, EntityTag > &  _prop,
bool  _enable = true 
)

Definition at line 217 of file ResourceManagerT_impl.hh.

◆ storage_tracker() [1/2]

template<typename EntityTag >
detail::Tracker< PropertyStorageBase > & OpenVolumeMesh::ResourceManager::storage_tracker
protected

Definition at line 45 of file ResourceManagerT_impl.hh.

◆ storage_tracker() [2/2]

detail::Tracker< PropertyStorageBase > & OpenVolumeMesh::ResourceManager::storage_tracker ( EntityType  type) const
protected

Definition at line 88 of file ResourceManager.cc.

◆ swap_property_elements()

template<typename Handle >
void OpenVolumeMesh::ResourceManager::swap_property_elements ( Handle  _idx_a,
Handle  _idx_b 
)
protected

Definition at line 69 of file ResourceManagerT_impl.hh.

◆ vertex_deleted()

void OpenVolumeMesh::ResourceManager::vertex_deleted ( const VertexHandle _h)
protected

Definition at line 127 of file ResourceManager.cc.

◆ vertex_property_exists()

template<class T >
bool OpenVolumeMesh::ResourceManager::vertex_property_exists ( const std::string &  _name) const
inline

Definition at line 289 of file ResourceManager.hh.

◆ vertex_props_begin()

auto OpenVolumeMesh::ResourceManager::vertex_props_begin ( ) const
inline

Definition at line 253 of file ResourceManager.hh.

◆ vertex_props_end()

auto OpenVolumeMesh::ResourceManager::vertex_props_end ( ) const
inline

Definition at line 254 of file ResourceManager.hh.

Friends And Related Function Documentation

◆ PropertyStorageBase

friend class PropertyStorageBase
friend

Definition at line 99 of file ResourceManager.hh.

Member Data Documentation

◆ persistent_props_

PerEntity<PersistentProperties> OpenVolumeMesh::ResourceManager::persistent_props_
private

Definition at line 96 of file ResourceManager.hh.

◆ storage_trackers_

PerEntity<detail::Tracker<PropertyStorageBase> > OpenVolumeMesh::ResourceManager::storage_trackers_
mutableprotected

Definition at line 105 of file ResourceManager.hh.


The documentation for this class was generated from the following files: