Commit 2d27d912 authored by Mike Kremer's avatar Mike Kremer

Added new files with new headers and namespacce

git-svn-id: http://www.openvolumemesh.org/svnrepo/OpenVolumeMesh/trunk@13 66977474-1d4b-4f09-8fe9-267525286df2
parent b4439443
/*===========================================================================*\
* *
* 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 <http://www.gnu.org/licenses/>. *
* *
\*===========================================================================*/
/*===========================================================================*\
* *
* $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
//=============================================================================
//
// 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 <http://www.gnu.org/licenses/>. *
* *
\*===========================================================================*/
/*===========================================================================*\
* *
* $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
//=============================================================================
/*===========================================================================*\
* *
* 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 <http://www.gnu.org/licenses/>. *
* *
\*===========================================================================*/
/*===========================================================================*\
* *
* $Revision: 1 $ *
* $Date: 2011-01-09 12:46:45 +0100 (Mo, 09. Jan 2011) $ *
* $LastChangedBy: kremer $ *
* *
\*===========================================================================*/
#ifndef OPENVOLUMEMESHBASEPROPERTY_HH
#define OPENVOLUMEMESHBASEPROPERTY_HH
#include <limits>
#include <string>
//== 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<size_t>::max();
public:
......@@ -102,5 +149,7 @@ private:
bool persistent_;
};
} // Namespace OpenVolumeMesh
#endif //OPENVOLUMEMESHBASEPROPERTY_HH
/*
* 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 <http://www.gnu.org/licenses/>. *
* *
\*===========================================================================*/
/*===========================================================================*\
* *
* $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_ */
/*===========================================================================*\
* *
* 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 <http://www.gnu.org/licenses/>. *
* *
\*===========================================================================*/
/*===========================================================================*\
* *
* $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<T> vector_type;
typedef std::vector<T> 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<T> {
}
};
} // Namespace OpenVolumeMesh
//=============================================================================
#endif // OPENVOLUMEMESHPROPERTY_HH defined
//=============================================================================
/*===========================================================================*\
* *
* 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 <http://www.gnu.org/licenses/>. *
* *
\*===========================================================================*/
/*===========================================================================*\
* *
* $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
/*
* 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 <http://www.gnu.org/licenses/>. *
* *
\*===========================================================================*/
/*===========================================================================*\
* *
* $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_ */
/*
* 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 <http://www.gnu.org/licenses/>. *
* *
\*===========================================================================*/
/*===========================================================================*\
* *
* $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 <vector>
#include <iterator>
namespace OpenVolumeMesh {
// Forward declaration
template <class VecT>
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
......
/*
* 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 <http://www.gnu.org/licenses/>. *
* *
\*===========================================================================*/
/*===========================================================================*\
* *
* $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<VecT>& CellIter<VecT>::operator++() {
BaseIter::cur_handle(typename OpenVolumeMesh<VecT>::CellHandle(cur_index_));
return *this;
}
} // Namespace OpenVolumeMesh
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment