diff --git a/src/Core/OpenVolumeMeshBaseKernel.cc b/src/Core/OpenVolumeMeshBaseKernel.cc index 5c0cbd1e5a7d6d6ecb7c0c7f0cf3a5e5e1b79ec3..9b30947c5f82dba2cacd00f4286ea933d5e62af2 100644 --- a/src/Core/OpenVolumeMeshBaseKernel.cc +++ b/src/Core/OpenVolumeMeshBaseKernel.cc @@ -1,5 +1,49 @@ +/*===========================================================================*\ + * * + * OpenVolumeMesh * + * Copyright (C) 2011 by Computer Graphics Group, RWTH Aachen * + * www.openmesh.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 . * + * * +\*===========================================================================*/ + +/*===========================================================================*\ + * * + * $Revision: 1 $ * + * $Date: 2011-01-09 12:46:45 +0100 (Mo, 09. Jan 2011) $ * + * $LastChangedBy: kremer $ * + * * +\*===========================================================================*/ + #include "OpenVolumeMeshBaseKernel.hh" +namespace OpenVolumeMesh { + void OpenVolumeMeshBaseKernel::property_stats(std::ostream& _ostr) const { const OpenVolumeMeshPropertyContainer::Properties& vps = vprops_.properties(); @@ -223,3 +267,5 @@ void OpenVolumeMeshBaseKernel::mprop_stats(std::ostream& _ostr) const { *it == NULL ? (void) (_ostr << "[deleted]" << "\n") : (*it)->stats( _ostr); } + +} // Namespace OpenVolumeMesh diff --git a/src/Core/OpenVolumeMeshBaseKernel.hh b/src/Core/OpenVolumeMeshBaseKernel.hh index c18b647795543f1f134537c2bd97347e09065b31..82472ea7a23631528e7a87e8b76e902f4383ca17 100644 --- a/src/Core/OpenVolumeMeshBaseKernel.hh +++ b/src/Core/OpenVolumeMeshBaseKernel.hh @@ -1,9 +1,44 @@ -//============================================================================= -// -// CLASS OpenVolumeMeshBaseKernel -// -//============================================================================= - +/*===========================================================================*\ + * * + * OpenVolumeMesh * + * Copyright (C) 2011 by Computer Graphics Group, RWTH Aachen * + * www.openmesh.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 . * + * * +\*===========================================================================*/ + +/*===========================================================================*\ + * * + * $Revision: 1 $ * + * $Date: 2011-01-09 12:46:45 +0100 (Mo, 09. Jan 2011) $ * + * $LastChangedBy: kremer $ * + * * +\*===========================================================================*/ #ifndef OPENVOLUMEMESHBASEKERNEL_HH #define OPENVOLUMEMESHBASEKERNEL_HH @@ -19,6 +54,8 @@ #include "OpenVolumeMeshPropertyContainer.hh" #include "OpenVolumeMeshHandle.hh" +namespace OpenVolumeMesh { + //== CLASS DEFINITION ========================================================= /// This class provides the basic property management like adding/removing @@ -821,6 +858,8 @@ private: OpenVolumeMeshPropertyContainer mprops_; }; +} // Namespace OpenVolumeMesh + //============================================================================= #endif // OPENVOLUMEMESHBASEKERNEL_HH defined //============================================================================= diff --git a/src/Core/OpenVolumeMeshBaseProperty.hh b/src/Core/OpenVolumeMeshBaseProperty.hh index 3a231e0d58a9209720b79f8103dfeb9fa4b26f6d..4911af51c7261330aef5959602152e3192bf2613 100644 --- a/src/Core/OpenVolumeMeshBaseProperty.hh +++ b/src/Core/OpenVolumeMeshBaseProperty.hh @@ -1,6 +1,51 @@ +/*===========================================================================*\ + * * + * OpenVolumeMesh * + * Copyright (C) 2011 by Computer Graphics Group, RWTH Aachen * + * www.openmesh.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 . * + * * +\*===========================================================================*/ + +/*===========================================================================*\ + * * + * $Revision: 1 $ * + * $Date: 2011-01-09 12:46:45 +0100 (Mo, 09. Jan 2011) $ * + * $LastChangedBy: kremer $ * + * * +\*===========================================================================*/ + + #ifndef OPENVOLUMEMESHBASEPROPERTY_HH #define OPENVOLUMEMESHBASEPROPERTY_HH +#include + #include //== CLASS DEFINITION ========================================================= @@ -11,11 +56,13 @@ **/ +namespace OpenVolumeMesh { + class OpenVolumeMeshBaseProperty { public: /// Indicates an error when a size is returned by a member. - static const size_t UnknownSize = size_t(-1); + static const size_t UnknownSize = std::numeric_limits::max(); public: @@ -102,5 +149,7 @@ private: bool persistent_; }; +} // Namespace OpenVolumeMesh + #endif //OPENVOLUMEMESHBASEPROPERTY_HH diff --git a/src/Core/OpenVolumeMeshHandle.hh b/src/Core/OpenVolumeMeshHandle.hh index 93df83831d58297609a5214aab24be335058c71f..805856971d49a15b4fcf6356478e270b8b87d528 100644 --- a/src/Core/OpenVolumeMeshHandle.hh +++ b/src/Core/OpenVolumeMeshHandle.hh @@ -1,13 +1,50 @@ -/* - * HandleType.hh - * - * Created on: 27.06.2011 - * Author: mike - */ +/*===========================================================================*\ + * * + * OpenVolumeMesh * + * Copyright (C) 2011 by Computer Graphics Group, RWTH Aachen * + * www.openmesh.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 . * + * * +\*===========================================================================*/ + +/*===========================================================================*\ + * * + * $Revision: 1 $ * + * $Date: 2011-01-09 12:46:45 +0100 (Mo, 09. Jan 2011) $ * + * $LastChangedBy: kremer $ * + * * +\*===========================================================================*/ #ifndef OPENVOLUMEMESHHANDLE_HH_ #define OPENVOLUMEMESHHANDLE_HH_ +namespace OpenVolumeMesh { + // Define handle types in order to distinguish different entities by their indices class OpenVolumeMeshHandle { public: @@ -51,4 +88,6 @@ class CellHandle : public OpenVolumeMeshHandle { public: CellHandle(int _idx class HalfEdgeHandle : public OpenVolumeMeshHandle { public: HalfEdgeHandle(int _idx = -1) : OpenVolumeMeshHandle(_idx) {} }; class HalfFaceHandle : public OpenVolumeMeshHandle { public: HalfFaceHandle(int _idx = -1) : OpenVolumeMeshHandle(_idx) {} }; +} // Namespace OpenVolumeMesh + #endif /* OPENVOLUMEMESHHANDLE_HH_ */ diff --git a/src/Core/OpenVolumeMeshProperty.hh b/src/Core/OpenVolumeMeshProperty.hh index 9ac2ba90e2d69bc5caeb9cbb8c0de0945cc22cec..09abf5121ab55b8214566d9ab8008fc5db416339 100644 --- a/src/Core/OpenVolumeMeshProperty.hh +++ b/src/Core/OpenVolumeMeshProperty.hh @@ -1,3 +1,45 @@ +/*===========================================================================*\ + * * + * OpenVolumeMesh * + * Copyright (C) 2011 by Computer Graphics Group, RWTH Aachen * + * www.openmesh.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 . * + * * +\*===========================================================================*/ + +/*===========================================================================*\ + * * + * $Revision: 1 $ * + * $Date: 2011-01-09 12:46:45 +0100 (Mo, 09. Jan 2011) $ * + * $LastChangedBy: kremer $ * + * * +\*===========================================================================*/ + #ifndef OPENVOLUMEMESHPROPERTY_HH #define OPENVOLUMEMESHPROPERTY_HH @@ -12,6 +54,8 @@ #include "OpenVolumeMeshBaseProperty.hh" #include "OpenVolumeMeshHandle.hh" +namespace OpenVolumeMesh { + //== CLASS DEFINITION ========================================================= /** \class OpenVolumeMeshPropertyT @@ -33,7 +77,7 @@ class OpenVolumeMeshPropertyT: public OpenVolumeMeshBaseProperty { public: typedef T Value; - typedef std::vector vector_type; + typedef std::vector vector_type; typedef T value_type; typedef typename vector_type::reference reference; typedef typename vector_type::const_reference const_reference; @@ -483,6 +527,8 @@ struct MPropHandleT: public OpenVolumeMeshBasePropHandleT { } }; +} // Namespace OpenVolumeMesh + //============================================================================= #endif // OPENVOLUMEMESHPROPERTY_HH defined //============================================================================= diff --git a/src/Core/OpenVolumeMeshPropertyContainer.hh b/src/Core/OpenVolumeMeshPropertyContainer.hh index 3dc5ca6f6dca420ab6a1afb918e7d258e0d18e2d..5d102de1a40eb2f46cc90cf49a3083b07c087ac3 100644 --- a/src/Core/OpenVolumeMeshPropertyContainer.hh +++ b/src/Core/OpenVolumeMeshPropertyContainer.hh @@ -1,3 +1,45 @@ +/*===========================================================================*\ + * * + * OpenVolumeMesh * + * Copyright (C) 2011 by Computer Graphics Group, RWTH Aachen * + * www.openmesh.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 . * + * * +\*===========================================================================*/ + +/*===========================================================================*\ + * * + * $Revision: 1 $ * + * $Date: 2011-01-09 12:46:45 +0100 (Mo, 09. Jan 2011) $ * + * $LastChangedBy: kremer $ * + * * +\*===========================================================================*/ + #ifndef OPENVOLUMEMESHPROPERTYCONTAINER_HH #define OPENVOLUMEMESHPROPERTYCONTAINER_HH @@ -6,6 +48,8 @@ #include "OpenVolumeMeshProperty.hh" +namespace OpenVolumeMesh { + //== FORWARDDECLARATIONS ====================================================== class BaseKernel; @@ -18,6 +62,7 @@ public: OpenVolumeMeshPropertyContainer() { } + virtual ~OpenVolumeMeshPropertyContainer() { std::for_each(properties_.begin(), properties_.end(), Delete()); } @@ -245,4 +290,6 @@ private: Properties properties_; }; +} // Namespace OpenVolumeMesh + #endif //OPENVOLUMEMESHPROPERTYCONTAINER_HH diff --git a/src/Core/OpenVolumeMeshStatus.hh b/src/Core/OpenVolumeMeshStatus.hh index 0a17025305e6dd8b56c468d7a5a7551a4c8c831b..c93e74920b9ed827653459b1c4f9b54902649108 100644 --- a/src/Core/OpenVolumeMeshStatus.hh +++ b/src/Core/OpenVolumeMeshStatus.hh @@ -1,13 +1,55 @@ -/* - * Status.hh - * - * Created on: Jun 10, 2011 - * Author: kremer - */ +/*===========================================================================*\ + * * + * OpenVolumeMesh * + * Copyright (C) 2011 by Computer Graphics Group, RWTH Aachen * + * www.openmesh.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 . * + * * +\*===========================================================================*/ + +/*===========================================================================*\ + * * + * $Revision: 1 $ * + * $Date: 2011-01-09 12:46:45 +0100 (Mo, 09. Jan 2011) $ * + * $LastChangedBy: kremer $ * + * * +\*===========================================================================*/ #ifndef STATUS_HH_ #define STATUS_HH_ +namespace OpenVolumeMesh { + +/** \class OpenVolumeMeshStatus + * + * \brief Stores statuses like selected, tagged, deleted, etc. + */ + class OpenVolumeMeshStatus { public: @@ -35,4 +77,6 @@ private: bool deleted_; }; +} // Namespace OpenVolumeMesh + #endif /* STATUS_HH_ */ diff --git a/src/PolyhedralMesh/Utils/Iterators.hh b/src/PolyhedralMesh/Utils/Iterators.hh index b8cbd334aba0c32d01be47a368d7b3417caf48ae..ce3f322532e7a7c6f6748570cbd4195d4bcf7bc2 100644 --- a/src/PolyhedralMesh/Utils/Iterators.hh +++ b/src/PolyhedralMesh/Utils/Iterators.hh @@ -1,9 +1,44 @@ -/* - * Iterators.hh - * - * Created on: 24.06.2011 - * Author: mike - */ +/*===========================================================================*\ + * * + * OpenVolumeMesh * + * Copyright (C) 2011 by Computer Graphics Group, RWTH Aachen * + * www.openmesh.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 . * + * * +\*===========================================================================*/ + +/*===========================================================================*\ + * * + * $Revision: 1 $ * + * $Date: 2011-01-09 12:46:45 +0100 (Mo, 09. Jan 2011) $ * + * $LastChangedBy: kremer $ * + * * +\*===========================================================================*/ #ifndef ITERATORS_HH_ #define ITERATORS_HH_ @@ -11,6 +46,8 @@ #include #include +namespace OpenVolumeMesh { + // Forward declaration template class OpenVolumeMesh; @@ -32,7 +69,7 @@ public: valid_(true), cur_handle_(_ch), ref_handle_(_ih), mesh_(_mesh) {} // STL compliance (needs to have default constructor) - BaseIterator() : valid_(false) {} + BaseIterator() : valid_(false), mesh_(0) {} virtual ~BaseIterator() {} bool operator== (const BaseIterator& _c) const { return (this->cur_handle_ == _c.cur_handle() && @@ -891,6 +928,8 @@ private: //=========================================================================== +} // Namespace OpenVolumeMesh + #if defined(INCLUDE_TEMPLATES) && !defined(ITERATORST_CC) #include "IteratorsT.cc" #endif diff --git a/src/PolyhedralMesh/Utils/IteratorsT.cc b/src/PolyhedralMesh/Utils/IteratorsT.cc index f227c5222243fdac9ab630c91c3ea0299c818ba0..50a810a3c237869dcd7e1992016a69b762ce989a 100644 --- a/src/PolyhedralMesh/Utils/IteratorsT.cc +++ b/src/PolyhedralMesh/Utils/IteratorsT.cc @@ -1,9 +1,44 @@ -/* - * IteratorsT.cc - * - * Created on: May 26, 2011 - * Author: kremer - */ +/*===========================================================================*\ + * * + * OpenVolumeMesh * + * Copyright (C) 2011 by Computer Graphics Group, RWTH Aachen * + * www.openmesh.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 . * + * * +\*===========================================================================*/ + +/*===========================================================================*\ + * * + * $Revision: 1 $ * + * $Date: 2011-01-09 12:46:45 +0100 (Mo, 09. Jan 2011) $ * + * $LastChangedBy: kremer $ * + * * +\*===========================================================================*/ #define ITERATORST_CC @@ -12,6 +47,8 @@ #include "Iterators.hh" +namespace OpenVolumeMesh { + //================================================================================================ // VertexOHalfedgeIter //================================================================================================ @@ -655,3 +692,5 @@ CellIter& CellIter::operator++() { BaseIter::cur_handle(typename OpenVolumeMesh::CellHandle(cur_index_)); return *this; } + +} // Namespace OpenVolumeMesh