/*===========================================================================*\ * * * OpenVolumeMesh * * Copyright (C) 2011 by Computer Graphics Group, RWTH Aachen * * www.openvolumemesh.org * * * *---------------------------------------------------------------------------* * This file is part of OpenVolumeMesh. * * * * OpenVolumeMesh is free software: you can redistribute it and/or modify * * it under the terms of the GNU Lesser General Public License as * * published by the Free Software Foundation, either version 3 of * * the License, or (at your option) any later version with the * * following exceptions: * * * * If other files instantiate templates or use macros * * or inline functions from this file, or you compile this file and * * link it with other files to produce an executable, this file does * * not by itself cause the resulting executable to be covered by the * * GNU Lesser General Public License. This exception does not however * * invalidate any other reasons why the executable file might be * * covered by the GNU Lesser General Public License. * * * * OpenVolumeMesh is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU Lesser General Public License for more details. * * * * You should have received a copy of the GNU LesserGeneral Public * * License along with OpenVolumeMesh. If not, * * see . * * * \*===========================================================================*/ #pragma once #include #include #include #include #include "Entities.hh" #include "PropertyHandles.hh" #include "PropertyPtr.hh" namespace OpenVolumeMesh { template class OpenVolumeMeshPropertyT; class ResourceManager; template const std::string typeName(); template <> const std::string typeName(); template <> const std::string typeName(); template <> const std::string typeName(); template <> const std::string typeName(); template <> const std::string typeName(); template <> const std::string typeName(); template <> const std::string typeName(); template <> const std::string typeName(); template <> const std::string typeName(); template <> const std::string typeName(); template <> const std::string typeName(); template <> const std::string typeName >(); template <> const std::string typeName >(); template <> const std::string typeName >(); template <> const std::string typeName >(); template <> const std::string typeName > >(); template const std::string entityTypeName(); template <> const std::string entityTypeName(); template <> const std::string entityTypeName(); template <> const std::string entityTypeName(); template <> const std::string entityTypeName(); template <> const std::string entityTypeName(); template <> const std::string entityTypeName(); template <> const std::string entityTypeName(); template class PropertyTT : public PropertyPtr, Entity> { public: template PropertyTT(MeshT *mesh, const std::string& _name, const T &_def = T()) : PropertyTT(std::move(mesh->template request_property(_name, _def))) {} using PropertyHandleT = OpenVolumeMesh::PropHandleT; PropertyTT(const std::string& _name, const std::string& _internal_type_name, ResourceManager& _resMan, PropertyHandleT _handle, const T &_def = T()); ~PropertyTT() override = default; BaseProperty* clone(ResourceManager &_resMan, OpenVolumeMeshHandle _handle) const override; const std::string entityType() const override { return entityTypeName(); } const std::string typeNameWrapper() const override { return typeName(); } private: PropertyTT(OpenVolumeMeshPropertyT *_prop, ResourceManager& _resMan, PropertyHandleT _handle); }; template using VertexPropertyT = PropertyTT; template using EdgePropertyT = PropertyTT; template using HalfEdgePropertyT = PropertyTT; template using FacePropertyT = PropertyTT; template using HalfFacePropertyT = PropertyTT; template using CellPropertyT = PropertyTT; template using MeshPropertyT = PropertyTT; } // Namespace OpenVolumeMesh #if defined(INCLUDE_TEMPLATES) && !defined(PROPERTYDEFINEST_CC) #include "PropertyDefinesT_impl.hh" #endif