43#ifndef PROPERTYDEFINES_HH_
44#define PROPERTYDEFINES_HH_
51#include "PropertyHandles.hh"
52#include "PropertyPtr.hh"
54namespace OpenVolumeMesh {
62const std::string typeName();
64template <>
const std::string typeName<int>();
65template <>
const std::string typeName<unsigned int>();
66template <>
const std::string typeName<short>();
67template <>
const std::string typeName<long>();
68template <>
const std::string typeName<unsigned long>();
69template <>
const std::string typeName<char>();
70template <>
const std::string typeName<unsigned char>();
71template <>
const std::string typeName<bool>();
72template <>
const std::string typeName<float>();
73template <>
const std::string typeName<double>();
74template <>
const std::string typeName<std::string>();
82 virtual void serialize(std::ostream& _ostr)
const;
83 virtual void deserialize(std::istream& _istr);
84 virtual const std::string entityType()
const {
return "VProp"; }
85 virtual const std::string typeNameWrapper()
const {
return typeName<T>(); }
88class EdgePropertyT :
public PropertyPtr<OpenVolumeMeshPropertyT<T>, EdgePropHandle> {
90 EdgePropertyT(
const std::string& _name, ResourceManager& _resMan,
EdgePropHandle _handle,
const T _def = T());
91 virtual ~EdgePropertyT() {}
92 virtual void serialize(std::ostream& _ostr)
const;
93 virtual void deserialize(std::istream& _istr);
94 virtual const std::string entityType()
const {
return "EProp"; }
95 virtual const std::string typeNameWrapper()
const {
return typeName<T>(); }
98class HalfEdgePropertyT :
public PropertyPtr<OpenVolumeMeshPropertyT<T>, HalfEdgePropHandle> {
100 HalfEdgePropertyT(
const std::string& _name, ResourceManager& _resMan,
HalfEdgePropHandle _handle,
const T _def = T());
101 virtual ~HalfEdgePropertyT() {}
102 virtual void serialize(std::ostream& _ostr)
const;
103 virtual void deserialize(std::istream& _istr);
104 virtual const std::string entityType()
const {
return "HEProp"; }
105 virtual const std::string typeNameWrapper()
const {
return typeName<T>(); }
108class FacePropertyT :
public PropertyPtr<OpenVolumeMeshPropertyT<T>, FacePropHandle> {
110 FacePropertyT(
const std::string& _name, ResourceManager& _resMan,
FacePropHandle _handle,
const T _def = T());
111 virtual ~FacePropertyT() {}
112 virtual void serialize(std::ostream& _ostr)
const;
113 virtual void deserialize(std::istream& _istr);
114 virtual const std::string entityType()
const {
return "FProp"; }
115 virtual const std::string typeNameWrapper()
const {
return typeName<T>(); }
118class HalfFacePropertyT :
public PropertyPtr<OpenVolumeMeshPropertyT<T>, HalfFacePropHandle> {
120 HalfFacePropertyT(
const std::string& _name, ResourceManager& _resMan,
HalfFacePropHandle _handle,
const T _def = T());
121 virtual ~HalfFacePropertyT() {}
122 virtual void serialize(std::ostream& _ostr)
const;
123 virtual void deserialize(std::istream& _istr);
124 virtual const std::string entityType()
const {
return "HFProp"; }
125 virtual const std::string typeNameWrapper()
const {
return typeName<T>(); }
128class CellPropertyT :
public PropertyPtr<OpenVolumeMeshPropertyT<T>, CellPropHandle> {
130 CellPropertyT(
const std::string& _name, ResourceManager& _resMan,
CellPropHandle _handle,
const T _def = T());
131 virtual ~CellPropertyT() {}
132 virtual void serialize(std::ostream& _ostr)
const;
133 virtual void deserialize(std::istream& _istr);
134 virtual const std::string entityType()
const {
return "CProp"; }
135 virtual const std::string typeNameWrapper()
const {
return typeName<T>(); }
138class MeshPropertyT :
public PropertyPtr<OpenVolumeMeshPropertyT<T>, MeshPropHandle> {
140 MeshPropertyT(
const std::string& _name, ResourceManager& _resMan,
MeshPropHandle _handle,
const T _def = T());
141 virtual ~MeshPropertyT() {}
142 virtual void serialize(std::ostream& _ostr)
const;
143 virtual void deserialize(std::istream& _istr);
144 virtual const std::string entityType()
const {
return "MProp"; }
145 virtual const std::string typeNameWrapper()
const {
return typeName<T>(); }
150#if defined(INCLUDE_TEMPLATES) && !defined(PROPERTYDEFINEST_CC)
151#include "PropertyDefinesT.cc"
Definition PropertyHandles.hh:56
Definition PropertyHandles.hh:52
Definition PropertyHandles.hh:54
Definition PropertyHandles.hh:53
Definition PropertyHandles.hh:55
Definition PropertyHandles.hh:57
Default property class for any type T.
Definition OpenVolumeMeshProperty.hh:71
PropertyPtr(OpenVolumeMeshPropertyT< T > *_ptr, ResourceManager &_resMan, VertexPropHandle _handle)
Definition PropertyPtrT.cc:52
Definition ResourceManager.hh:76
Definition PropertyHandles.hh:51
VertexPropertyT(const std::string &_name, ResourceManager &_resMan, VertexPropHandle _handle, const T _def=T())
Property classes for the different entity types.
Definition PropertyDefinesT.cc:54