Commit b626334d authored by Mike Kremer's avatar Mike Kremer

Deleted source folder

git-svn-id: http://www.openvolumemesh.org/svnrepo/OpenVolumeMesh/trunk@92 66977474-1d4b-4f09-8fe9-267525286df2
parent 9d6145b7
include (ACGCommon)
include_directories (
..
${CMAKE_CURRENT_SOURCE_DIR}
)
# source code directories
set (directories
.
OpenVolumeMesh/Core
OpenVolumeMesh/FileManager
OpenVolumeMesh/Geometry
OpenVolumeMesh/PolyhedralMesh
OpenVolumeMesh/PolyhedralMesh/Utils
OpenVolumeMesh/HexahedralMesh
OpenVolumeMesh/HexahedralMesh/Utils
)
# collect all header and source files
acg_append_files (headers "*.hh" ${directories})
acg_append_files (sources "*.cc" ${directories})
# Disable Library installation when not building OpenVolumeMesh on its own but as part of another project!
if ( NOT ${PROJECT_NAME} MATCHES "OpenVolumeMesh")
set(ACG_NO_LIBRARY_INSTALL true)
endif()
if (WIN32)
# OpenVolumeMesh has no dll exports so we have to build a static library on windows
acg_add_library (OpenVolumeMesh STATIC ${sources} ${headers})
else ()
acg_add_library (OpenVolumeMesh SHAREDANDSTATIC ${sources} ${headers})
set_target_properties (OpenVolumeMesh PROPERTIES VERSION ${OPENVOLUMEMESH_VERSION_MAJOR}.${OPENVOLUMEMESH_VERSION_MINOR}
SOVERSION ${OPENVOLUMEMESH_VERSION_MAJOR}.${OPENVOLUMEMESH_VERSION_MINOR} )
endif ()
# Only install if the project name matches OpenVolumeMesh.
if (NOT APPLE AND ${PROJECT_NAME} MATCHES "OpenVolumeMesh")
# Install Header Files)
install(DIRECTORY .
DESTINATION include
FILES_MATCHING
PATTERN "*.hh"
PATTERN "Unittests" EXCLUDE
PATTERN "CVS" EXCLUDE
PATTERN ".svn" EXCLUDE
PATTERN "tmp" EXCLUDE
PATTERN "Templates" EXCLUDE
PATTERN "Debian*" EXCLUDE)
#install Template cc files (required by headers)
install(DIRECTORY .
DESTINATION include
FILES_MATCHING
PATTERN "*T.cc"
PATTERN "Unittests" EXCLUDE
PATTERN "CVS" EXCLUDE
PATTERN ".svn" EXCLUDE
PATTERN "tmp" EXCLUDE
PATTERN "Templates" EXCLUDE
PATTERN "Debian*" EXCLUDE)
endif ()
# Only build unittests if not built as external library
if(${PROJECT_NAME} MATCHES "OpenVolumeMesh")
# Add unittests target
add_subdirectory(Unittests)
endif()
/*===========================================================================*\
* *
* 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 <http://www.gnu.org/licenses/>. *
* *
\*===========================================================================*/
/*===========================================================================*\
* *
* $Revision$ *
* $Date$ *
* $LastChangedBy$ *
* *
\*===========================================================================*/
#include "OpenVolumeMeshBaseKernel.hh"
namespace OpenVolumeMesh {
void OpenVolumeMeshBaseKernel::property_stats(std::ostream& _ostr) const {
const OpenVolumeMeshPropertyContainer::Properties& vps =
vprops_.properties();
const OpenVolumeMeshPropertyContainer::Properties& hps =
heprops_.properties();
const OpenVolumeMeshPropertyContainer::Properties& eps =
eprops_.properties();
const OpenVolumeMeshPropertyContainer::Properties& fps =
fprops_.properties();
const OpenVolumeMeshPropertyContainer::Properties& hfps =
hfprops_.properties();
const OpenVolumeMeshPropertyContainer::Properties& cps =
cprops_.properties();
const OpenVolumeMeshPropertyContainer::Properties& mps =
mprops_.properties();
OpenVolumeMeshPropertyContainer::Properties::const_iterator it;
_ostr << vprops_.size() << " vprops:\n";
for (it = vps.begin(); it != vps.end(); ++it) {
*it == NULL ? (void) (_ostr << "[deleted]" << "\n") : (*it)->stats(
_ostr);
}
_ostr << heprops_.size() << " heprops:\n";
for (it = hps.begin(); it != hps.end(); ++it) {
*it == NULL ? (void) (_ostr << "[deleted]" << "\n") : (*it)->stats(
_ostr);
}
_ostr << eprops_.size() << " eprops:\n";
for (it = eps.begin(); it != eps.end(); ++it) {
*it == NULL ? (void) (_ostr << "[deleted]" << "\n") : (*it)->stats(
_ostr);
}
_ostr << fprops_.size() << " fprops:\n";
for (it = fps.begin(); it != fps.end(); ++it) {
*it == NULL ? (void) (_ostr << "[deleted]" << "\n") : (*it)->stats(
_ostr);
}
_ostr << hfprops_.size() << " hfprops:\n";
for (it = hfps.begin(); it != hfps.end(); ++it) {
*it == NULL ? (void) (_ostr << "[deleted]" << "\n") : (*it)->stats(
_ostr);
}
_ostr << cprops_.size() << " cprops:\n";
for (it = cps.begin(); it != cps.end(); ++it) {
*it == NULL ? (void) (_ostr << "[deleted]" << "\n") : (*it)->stats(
_ostr);
}
_ostr << mprops_.size() << " mprops:\n";
for (it = mps.begin(); it != mps.end(); ++it) {
*it == NULL ? (void) (_ostr << "[deleted]" << "\n") : (*it)->stats(
_ostr);
}
}
void OpenVolumeMeshBaseKernel::vprop_stats(std::string& _string) const {
_string.clear();
OpenVolumeMeshPropertyContainer::Properties::const_iterator it;
const OpenVolumeMeshPropertyContainer::Properties& vps =
vprops_.properties();
for (it = vps.begin(); it != vps.end(); ++it)
if (*it == NULL)
_string += "[deleted] \n";
else {
_string += (*it)->name();
_string += "\n";
}
}
void OpenVolumeMeshBaseKernel::heprop_stats(std::string& _string) const {
_string.clear();
OpenVolumeMeshPropertyContainer::Properties::const_iterator it;
const OpenVolumeMeshPropertyContainer::Properties& hps =
heprops_.properties();
for (it = hps.begin(); it != hps.end(); ++it)
if (*it == NULL)
_string += "[deleted] \n";
else {
_string += (*it)->name();
_string += "\n";
}
}
void OpenVolumeMeshBaseKernel::eprop_stats(std::string& _string) const {
_string.clear();
OpenVolumeMeshPropertyContainer::Properties::const_iterator it;
const OpenVolumeMeshPropertyContainer::Properties& eps =
eprops_.properties();
for (it = eps.begin(); it != eps.end(); ++it)
if (*it == NULL)
_string += "[deleted] \n";
else {
_string += (*it)->name();
_string += "\n";
}
}
void OpenVolumeMeshBaseKernel::fprop_stats(std::string& _string) const {
_string.clear();
OpenVolumeMeshPropertyContainer::Properties::const_iterator it;
const OpenVolumeMeshPropertyContainer::Properties& fps =
fprops_.properties();
for (it = fps.begin(); it != fps.end(); ++it)
if (*it == NULL)
_string += "[deleted] \n";
else {
_string += (*it)->name();
_string += "\n";
}
}
void OpenVolumeMeshBaseKernel::hfprop_stats(std::string& _string) const {
_string.clear();
OpenVolumeMeshPropertyContainer::Properties::const_iterator it;
const OpenVolumeMeshPropertyContainer::Properties& hfps =
hfprops_.properties();
for (it = hfps.begin(); it != hfps.end(); ++it)
if (*it == NULL)
_string += "[deleted] \n";
else {
_string += (*it)->name();
_string += "\n";
}
}
void OpenVolumeMeshBaseKernel::cprop_stats(std::string& _string) const {
_string.clear();
OpenVolumeMeshPropertyContainer::Properties::const_iterator it;
const OpenVolumeMeshPropertyContainer::Properties& cps =
cprops_.properties();
for (it = cps.begin(); it != cps.end(); ++it)
if (*it == NULL)
_string += "[deleted] \n";
else {
_string += (*it)->name();
_string += "\n";
}
}
void OpenVolumeMeshBaseKernel::mprop_stats(std::string& _string) const {
_string.clear();
OpenVolumeMeshPropertyContainer::Properties::const_iterator it;
const OpenVolumeMeshPropertyContainer::Properties& mps =
mprops_.properties();
for (it = mps.begin(); it != mps.end(); ++it)
if (*it == NULL)
_string += "[deleted] \n";
else {
_string += (*it)->name();
_string += "\n";
}
}
void OpenVolumeMeshBaseKernel::vprop_stats(std::ostream& _ostr) const {
OpenVolumeMeshPropertyContainer::Properties::const_iterator it;
const OpenVolumeMeshPropertyContainer::Properties& vps =
vprops_.properties();
for (it = vps.begin(); it != vps.end(); ++it)
*it == NULL ? (void) (_ostr << "[deleted]" << "\n") : (*it)->stats(
_ostr);
}
void OpenVolumeMeshBaseKernel::heprop_stats(std::ostream& _ostr) const {
OpenVolumeMeshPropertyContainer::Properties::const_iterator it;
const OpenVolumeMeshPropertyContainer::Properties& hps =
heprops_.properties();
for (it = hps.begin(); it != hps.end(); ++it)
*it == NULL ? (void) (_ostr << "[deleted]" << "\n") : (*it)->stats(
_ostr);
}
void OpenVolumeMeshBaseKernel::eprop_stats(std::ostream& _ostr) const {
OpenVolumeMeshPropertyContainer::Properties::const_iterator it;
const OpenVolumeMeshPropertyContainer::Properties& eps =
eprops_.properties();
for (it = eps.begin(); it != eps.end(); ++it)
*it == NULL ? (void) (_ostr << "[deleted]" << "\n") : (*it)->stats(
_ostr);
}
void OpenVolumeMeshBaseKernel::fprop_stats(std::ostream& _ostr) const {
OpenVolumeMeshPropertyContainer::Properties::const_iterator it;
const OpenVolumeMeshPropertyContainer::Properties& fps =
fprops_.properties();
for (it = fps.begin(); it != fps.end(); ++it)
*it == NULL ? (void) (_ostr << "[deleted]" << "\n") : (*it)->stats(
_ostr);
}
void OpenVolumeMeshBaseKernel::hfprop_stats(std::ostream& _ostr) const {
OpenVolumeMeshPropertyContainer::Properties::const_iterator it;
const OpenVolumeMeshPropertyContainer::Properties& hfps =
hfprops_.properties();
for (it = hfps.begin(); it != hfps.end(); ++it)
*it == NULL ? (void) (_ostr << "[deleted]" << "\n") : (*it)->stats(
_ostr);
}
void OpenVolumeMeshBaseKernel::cprop_stats(std::ostream& _ostr) const {
OpenVolumeMeshPropertyContainer::Properties::const_iterator it;
const OpenVolumeMeshPropertyContainer::Properties& cps =
cprops_.properties();
for (it = cps.begin(); it != cps.end(); ++it)
*it == NULL ? (void) (_ostr << "[deleted]" << "\n") : (*it)->stats(
_ostr);
}
void OpenVolumeMeshBaseKernel::mprop_stats(std::ostream& _ostr) const {
OpenVolumeMeshPropertyContainer::Properties::const_iterator it;
const OpenVolumeMeshPropertyContainer::Properties& mps =
mprops_.properties();
for (it = mps.begin(); it != mps.end(); ++it)
*it == NULL ? (void) (_ostr << "[deleted]" << "\n") : (*it)->stats(
_ostr);
}
} // Namespace OpenVolumeMesh
This diff is collapsed.
/*===========================================================================*\
* *
* 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 <http://www.gnu.org/licenses/>. *
* *
\*===========================================================================*/
/*===========================================================================*\
* *
* $Revision: 22 $ *
* $Date: 2012-01-10 10:10:39 +0100 (Tue, 10 Jan 2012) $ *
* $LastChangedBy: kremer $ *
* *
\*===========================================================================*/
#include "OpenVolumeMeshBaseProperty.hh"
namespace OpenVolumeMesh {
// Initialize constant
const size_t OpenVolumeMeshBaseProperty::UnknownSize = std::numeric_limits<size_t>::max();
} // Namespace OpenVolumeMesh
/*===========================================================================*\
* *
* 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 <http://www.gnu.org/licenses/>. *
* *
\*===========================================================================*/
/*===========================================================================*\
* *
* $Revision$ *
* $Date$ *
* $LastChangedBy$ *
* *
\*===========================================================================*/
#ifndef OPENVOLUMEMESHBASEPROPERTY_HH
#define OPENVOLUMEMESHBASEPROPERTY_HH
#include <limits>
#include <string>
#include <iostream>
//== CLASS DEFINITION =========================================================
/** \class OpenVolumeMeshBaseProperty
Abstract class defining the basic interface of a dynamic property.
**/
namespace OpenVolumeMesh {
class OpenVolumeMeshBaseProperty {
public:
/// Indicates an error when a size is returned by a member.
static const size_t UnknownSize;
public:
OpenVolumeMeshBaseProperty(const std::string& _name = "<unknown>") :
name_(_name), persistent_(false) {
}
OpenVolumeMeshBaseProperty(const OpenVolumeMeshBaseProperty& _rhs) :
name_(_rhs.name_), persistent_(_rhs.persistent_) {
}
virtual ~OpenVolumeMeshBaseProperty() {}
public:
/// Reserve memory for n elements.
virtual void reserve(size_t _n) = 0;
/// Resize storage to hold n elements.
virtual void resize(size_t _n) = 0;
/// Clear all elements and free memory.
virtual void clear() = 0;
/// Extend the number of elements by one.
virtual void push_back() = 0;
/// Let two elements swap their storage place.
virtual void swap(size_t _i0, size_t _i1) = 0;
/// Erase an element of the vector
virtual void delete_element(size_t _idx) = 0;
/// Return a deep copy of self.
virtual OpenVolumeMeshBaseProperty* clone() const = 0;
public:
/// Return the name of the property
const std::string& name() const {
return name_;
}
virtual void stats(std::ostream& _ostr) const {
_ostr << name() << (persistent() ? ", persistent " : "") << "\n";
}
public:
// I/O support
/// Returns true if the persistent flag is enabled else false.
bool persistent() const {
return persistent_;
}
/// Enable or disable persistency. Self must be a named property to enable
/// persistency.
void set_persistent(bool _yn) {
persistent_ = _yn;
}
/// Number of elements in property
virtual size_t n_elements() const = 0;
/// Size of one element in bytes or UnknownSize if not known.
virtual size_t element_size() const = 0;
/// Return size of property in bytes
virtual size_t size_of() const {
return size_of(n_elements());
}
/// Estimated size of property if it has _n_elem elements.
/// The member returns UnknownSize if the size cannot be estimated.
virtual size_t size_of(size_t _n_elem) const {
return (element_size() != UnknownSize) ? (_n_elem * element_size())
: UnknownSize;
}
private:
std::string name_;
bool persistent_;
};
} // Namespace OpenVolumeMesh
#endif //OPENVOLUMEMESHBASEPROPERTY_HH
/*===========================================================================*\
* *
* 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 <http://www.gnu.org/licenses/>. *
* *
\*===========================================================================*/
/*===========================================================================*\
* *
* $Revision$ *
* $Date$ *
* $LastChangedBy$ *
* *
\*===========================================================================*/
#ifndef OPENVOLUMEMESHHANDLE_HH_
#define OPENVOLUMEMESHHANDLE_HH_
namespace OpenVolumeMesh {
// Define handle types in order to distinguish different entities by their indices
class OpenVolumeMeshHandle {
public:
// Default constructor
explicit OpenVolumeMeshHandle(int _idx) : idx_(_idx) {};
OpenVolumeMeshHandle& operator=(int _idx) {
idx_ = _idx;
return *this;