|
Boost-Commit : |
From: huseyinakcan_at_[hidden]
Date: 2007-07-17 21:47:03
Author: huseyinakcan
Date: 2007-07-17 21:47:01 EDT (Tue, 17 Jul 2007)
New Revision: 7461
URL: http://svn.boost.org/trac/boost/changeset/7461
Log:
halfedge_selector tests (not complete)
also I removed all the free functions from
halfedge_selectors.hpp and put them in halfedge_functions.hpp
Added:
sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/halfedge_functions.hpp
sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/halfedge_selectors.t.cpp
Text files modified:
sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/Makefile | 5 +
sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/halfedge_ds.hpp | 91 +++++++++++++++++++++++++++++----------
sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/halfedge_selectors.hpp | 39 +++--------------
sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/vertex_selectors.hpp | 2
sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/vertex_selectors.t.cpp | 2
5 files changed, 79 insertions(+), 60 deletions(-)
Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/Makefile
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/Makefile (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/Makefile 2007-07-17 21:47:01 EDT (Tue, 17 Jul 2007)
@@ -12,7 +12,7 @@
PACKAGE_LIBRARY=libhalfedge_ds.a
TEST_DRIVERS=container_selectors.t facet_selectors.t \
- vertex_selectors.t
+ vertex_selectors.t halfedge_selectors.t
.SUFFIXES:
.SUFFIXES: ${TARGET}.o .o .cpp .hpp
@@ -50,6 +50,8 @@
vertex_selectors.t.o:
+halfedge_selectors.t.o:
+
%.t.o: %.t.cpp %.hpp
${CXX} ${CXXFLAGS} ${CXXINCLUDES} -c -o $*.t.o $<
@@ -59,6 +61,7 @@
vertex_selectors.t:
+halfedge_selectors.t:
## UTILITIES
Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/halfedge_ds.hpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/halfedge_ds.hpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/halfedge_ds.hpp 2007-07-17 21:47:01 EDT (Tue, 17 Jul 2007)
@@ -47,7 +47,6 @@
typename HalfedgeS::container_selector, vecS>::value };
enum { is_forward = HalfedgeS::is_forward };
enum { is_backward = HalfedgeS::is_backward };
- enum { is_bidir = HalfedgeS::is_bidir };
typedef typename HalfedgeS::tag traversal_tag;
// halfedge config
@@ -63,30 +62,72 @@
};
};
-//template<typename Selector, typename HalfedgeDescriptor>
-//struct opposite_helper {
-// inline static
-// HalfedgeDescriptor&
-// opposite(HalfedgeDescriptor& h)
-// {
-// // halfedges come in pairs, point to each other as
-// // opposite. If halfedges stored in a list, use the
-// // opposite pointer.
-// return h->opposite_;
-// }
-//};
-//
-//template<typename HalfedgeDescriptor>
-//struct opposite_helper<vecS, HalfedgeDescriptor> {
-// inline static
-// HalfedgeDescriptor&
-// opposite(HalfedgeDescriptor& h)
-// {
-// // halfedges come in pairs, point to each other as
-// // opposite. If halfedges stored in a vector:
-// return h^1;
-// }
-//};
+template <typename HalfedgeS>
+struct halfedge_ds_gen<HalfedgeS, noVertexS, noFacetS> {
+ struct config {
+
+ enum { halfedge_has_opposite_member = !meta_is_same<
+ typename HalfedgeS::container_selector, vecS>::value };
+ enum { is_forward = HalfedgeS::is_forward };
+ enum { is_backward = HalfedgeS::is_backward };
+ typedef typename HalfedgeS::tag traversal_tag;
+ // halfedge config
+
+ enum { halfedge_supports_vertices = false };
+ enum { is_source = false }; // has no meaning here,
+ // but vertex_helper in stored_halfedge
+ // requires it defined even for noVertexS.
+ enum { is_target = false }; // has no meaning here
+
+ enum { halfedge_supports_facets = false };
+ };
+};
+
+template <typename HalfedgeS, typename FacetS>
+struct halfedge_ds_gen<HalfedgeS, noVertexS, FacetS> {
+ struct config {
+
+ enum { halfedge_has_opposite_member = !meta_is_same<
+ typename HalfedgeS::container_selector, vecS>::value };
+ enum { is_forward = HalfedgeS::is_forward };
+ enum { is_backward = HalfedgeS::is_backward };
+ typedef typename HalfedgeS::tag traversal_tag;
+ // halfedge config
+
+ enum { halfedge_supports_vertices = false };
+ enum { is_source = false }; // has no meaning here,
+ // but vertex_helper in stored_halfedge
+ // requires it defined even for noVertexS.
+ enum { is_target = false }; // has no meaning here
+
+ enum { halfedge_supports_facets= !meta_is_same<FacetS,noFacetS>::value};
+ // facet config
+ };
+};
+
+template <typename HalfedgeS, typename VertexS>
+struct halfedge_ds_gen<HalfedgeS, VertexS, noFacetS> {
+ struct config {
+
+ enum { halfedge_has_opposite_member = !meta_is_same<
+ typename HalfedgeS::container_selector, vecS>::value };
+ enum { is_forward = HalfedgeS::is_forward };
+ enum { is_backward = HalfedgeS::is_backward };
+ typedef typename HalfedgeS::tag traversal_tag;
+ // halfedge config
+
+ enum { halfedge_supports_vertices = !meta_is_same<
+ VertexS,noVertexS>::value };
+ enum { is_source = VertexS::is_source };
+ enum { is_target = VertexS::is_target };
+ enum { has_vertex_link = VertexS::has_vertex_link };
+ // vertex config
+
+ enum { halfedge_supports_facets= false };
+ // facet config
+ };
+};
+
//template <typename HalfedgeS = halfedgeS<vecS, forwardS<next_in_facet_tag> >,
// typename VertexS = vertexS<vecS, vertexLinkS, sourceS>,
Added: sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/halfedge_functions.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/halfedge_functions.hpp 2007-07-17 21:47:01 EDT (Tue, 17 Jul 2007)
@@ -0,0 +1,96 @@
+//halfedge_functions.hpp -*- C++ -*-
+//
+//@PURPOSE: Provide free functions for accessing and manipulating halfedges.
+//
+//@DESCRIPTION: This file provides free functions for accessing and
+// manipulating halfedges. The list of these functions are as follows:
+//
+// - halfedges_begin: returns an iterator to the first halfedge in the 'hds'
+// - halfedges_end: returns an iterator after the last halfedge in the 'hds'
+// - num_halfedges: returns the number of halfedges in the 'hds'
+//
+
+#ifndef BOOST_HDSTL_HALFEDGE_FUNCTIONS_HPP
+#define BOOST_HDSTL_HALFEDGE_FUNCTIONS_HPP 1
+
+#include <boost/hdstl/halfedge_ds/halfedge_selectors.hpp>
+
+namespace boost {
+namespace hdstl {
+
+// FREE FUNCTIONS
+template <typename HalfedgeS, typename HalfedgeDescriptor,
+ typename VertexDescriptor, typename FacetDescriptor, typename Config>
+typename halfedge_gen<HalfedgeS, HalfedgeDescriptor, VertexDescriptor,
+ FacetDescriptor, Config>::halfedge_iterator
+halfedges_begin(halfedge_gen<HalfedgeS, HalfedgeDescriptor, VertexDescriptor,
+ FacetDescriptor, Config>& hds) {
+ typedef typename halfedge_gen<HalfedgeS, HalfedgeDescriptor,
+ VertexDescriptor,FacetDescriptor, Config>::ContainerGen ContainerGen;
+ return ContainerGen::container_begin(hds.m_container);
+}
+
+template <typename HalfedgeS, typename HalfedgeDescriptor,
+ typename VertexDescriptor, typename FacetDescriptor, typename Config>
+typename halfedge_gen<HalfedgeS, HalfedgeDescriptor, VertexDescriptor,
+ FacetDescriptor, Config>::halfedge_iterator
+halfedges_end(halfedge_gen<HalfedgeS, HalfedgeDescriptor, VertexDescriptor,
+ FacetDescriptor, Config>& hds) {
+ typedef typename halfedge_gen<HalfedgeS, HalfedgeDescriptor,
+ VertexDescriptor,FacetDescriptor, Config>::ContainerGen ContainerGen;
+ return ContainerGen::container_end(hds.m_container);
+}
+
+template <typename HalfedgeS, typename HalfedgeDescriptor,
+ typename VertexDescriptor, typename FacetDescriptor, typename Config>
+typename halfedge_gen<HalfedgeS, HalfedgeDescriptor, VertexDescriptor,
+ FacetDescriptor, Config>::size_type
+num_halfedges(halfedge_gen<HalfedgeS, HalfedgeDescriptor, VertexDescriptor,
+ FacetDescriptor, Config>& hds) {
+ return hds.m_container.size();
+}
+
+template<typename HalfedgeS, typename HalfedgeDescriptor>
+struct opposite_function_helper {
+ inline static
+ HalfedgeDescriptor&
+ opposite(HalfedgeDescriptor& h)
+ {
+ // halfedges come in pairs, point to each other as
+ // opposite. If halfedges stored in a list, use the
+ // opposite pointer.
+ return h->m_opposite;
+ }
+};
+
+template<typename HalfedgeDescriptor, typename TraversalS>
+struct opposite_function_helper<halfedgeS<vecS,TraversalS>, HalfedgeDescriptor> {
+ inline static
+ HalfedgeDescriptor&
+ opposite(HalfedgeDescriptor& h)
+ {
+ // halfedges come in pairs, point to each other as
+ // opposite. If halfedges stored in a vector:
+ return h^1;
+ }
+};
+
+template <typename HalfedgeS, typename HalfedgeDescriptor,
+ typename VertexDescriptor, typename FacetDescriptor, typename Config>
+HalfedgeDescriptor&
+opposite(HalfedgeDescriptor& h, halfedge_gen<HalfedgeS, HalfedgeDescriptor,
+ VertexDescriptor, FacetDescriptor, Config>& hds)
+{
+
+ typedef typename halfedge_gen<HalfedgeS, HalfedgeDescriptor,
+ VertexDescriptor,FacetDescriptor, Config>
+ ::halfedge_selector halfedge_selector;
+ return opposite_function_helper<halfedge_selector,HalfedgeDescriptor>
+ ::opposite(h);
+}
+
+
+} // namespace hdstl
+} // namespace boost
+
+#endif
Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/halfedge_selectors.hpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/halfedge_selectors.hpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/halfedge_selectors.hpp 2007-07-17 21:47:01 EDT (Tue, 17 Jul 2007)
@@ -117,7 +117,7 @@
template<bool IsSource, typename VertexDescriptor>
struct vertex_helper<true, IsSource, VertexDescriptor>
: public source_helper<IsSource>
-, public target_helper<!IsTarget>
+, public target_helper<!IsSource>
{
};
@@ -165,7 +165,7 @@
struct stored_halfedge
: public opposite_helper<Config::halfedge_has_opposite_member, HalfedgeDescriptor>,
public vertex_helper<Config::halfedge_supports_vertices,
- Config::is_source, Config::is_target, VertexDescriptor>,
+ Config::is_source, VertexDescriptor>,
public facet_helper<Config::halfedge_supports_facets, FacetDescriptor>,
public traversal_helper<Config::is_forward, Config::is_backward, HalfedgeDescriptor>
{
@@ -199,6 +199,8 @@
struct halfedge_gen<halfedgeS<ContainerS,TraversalS>, HalfedgeDescriptor,
VertexDescriptor, FacetDescriptor, Config> {
// TYPES
+ typedef halfedgeS<ContainerS,TraversalS> halfedge_selector;
+
typedef stored_halfedge<HalfedgeDescriptor, VertexDescriptor,
FacetDescriptor, Config> halfedge_type;
// The stored halfedge type for this halfedge generator.
@@ -209,6 +211,9 @@
typedef typename ContainerGen::type container_type;
// The halfedge container type for this halfedge generator.
+ typedef typename ContainerGen::size_type size_type;
+ // The halfedge container size type for this halfedge generator.
+
typedef typename ContainerGen::descriptor halfedge_descriptor;
// The halfedge descriptor type for this halfedge generator.
@@ -221,37 +226,7 @@
// obtained.
};
-// FREE FUNCTIONS
-template <typename HalfedgeS, typename HalfedgeDescriptor,
- typename VertexDescriptor, typename FacetDescriptor, typename Config>
-typename halfedge_gen<HalfedgeS, HalfedgeDescriptor, VertexDescriptor,
- FacetDescriptor, Config>::iterator
-halfedges_begin(halfedge_gen<HalfedgeS, HalfedgeDescriptor, VertexDescriptor,
- FacetDescriptor, Config> const& hds) {
- typedef typename halfedge_gen<HalfedgeS, HalfedgeDescriptor,
- VertexDescriptor,FacetDescriptor, Config>::ContainerGen ContainerGen;
- return ContainerGen::container_begin(hds.m_container);
-}
-
-template <typename HalfedgeS, typename HalfedgeDescriptor,
- typename VertexDescriptor, typename FacetDescriptor, typename Config>
-typename halfedge_gen<HalfedgeS, HalfedgeDescriptor, VertexDescriptor,
- FacetDescriptor, Config>::iterator
-halfedges_end(halfedge_gen<HalfedgeS, HalfedgeDescriptor, VertexDescriptor,
- FacetDescriptor, Config> const& hds) {
- typedef typename halfedge_gen<HalfedgeS, HalfedgeDescriptor,
- VertexDescriptor,FacetDescriptor, Config>::ContainerGen ContainerGen;
- return ContainerGen::container_end(hds.m_container);
-}
-template <typename HalfedgeS, typename HalfedgeDescriptor,
- typename VertexDescriptor, typename FacetDescriptor, typename Config>
-typename halfedge_gen<HalfedgeS, HalfedgeDescriptor, VertexDescriptor,
- FacetDescriptor, Config>::iterator
-num_halfedges(halfedge_gen<HalfedgeS, HalfedgeDescriptor, VertexDescriptor,
- FacetDescriptor, Config> const& hds) {
- return hds.m_container.size();
-}
} // namespace hdstl
} // namespace boost
Added: sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/halfedge_selectors.t.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/halfedge_selectors.t.cpp 2007-07-17 21:47:01 EDT (Tue, 17 Jul 2007)
@@ -0,0 +1,361 @@
+//halfedge_selectors.hpp -*- C++ -*-
+//
+//@OVERVIEW: The component under test is a selector class. We
+// must make sure that all selectors are suitably defined and that the
+// selection is done properly.
+//
+//@TEST_PLAN: First create an instance of all the selectors (to make sure they
+// exist, and verify that there are no more than tested). Then instantiate the
+// 'container_gen<HalfedgeS,ValueType>' for a given value type and all
+// selectors, and verify that its members have the expected types and
+// signatures. Finally, verify that the usage example compiles and executes
+// without errors, when assert is replaced by BOOST_CHECK.
+
+#include <boost/hdstl/halfedge_ds/halfedge_selectors.hpp>
+#include <boost/hdstl/halfedge_ds/halfedge_functions.hpp>
+
+#include <boost/test/minimal.hpp>
+
+#include <set>
+#include <string>
+#include <vector>
+
+using namespace boost::hdstl;
+using namespace std;
+
+// ===========================================================================
+// SELECTION CLASSES
+// ===========================================================================
+
+template <typename HalfedgeS>
+bool selection_requirements(HalfedgeS const&) {
+ return false;
+}
+
+template <typename Selector, typename ForwardCategory>
+bool selection_requirements(halfedgeS<Selector,
+ forwardS<ForwardCategory> > const&) {
+ return true;
+}
+
+template <typename Selector, typename BackwardCategory>
+bool selection_requirements(halfedgeS<Selector,
+ backwardS<BackwardCategory> > const&) {
+ return true;
+}
+
+template <typename Selector, typename ForwardCategory,
+ typename BackwardCategory>
+bool selection_requirements(halfedgeS<Selector,
+ bidirS<ForwardCategory,
+ BackwardCategory> > const&) {
+ return true;
+}
+
+// ===========================================================================
+// CLASS HALFEDGE_GEN
+// ===========================================================================
+
+
+template <typename HalfedgeGen>
+bool halfedge_gen_requirements_void() {
+
+ // Types must exist.
+ typedef typename HalfedgeGen::halfedge_selector halfedge_selector;
+ typedef typename HalfedgeGen::halfedge_descriptor halfedge_descriptor;
+ typedef typename HalfedgeGen::halfedge_iterator halfedge_iterator;
+ typedef typename HalfedgeGen::halfedge_type halfedge_type;
+ typedef typename HalfedgeGen::container_type container_type;
+
+ halfedge_type fa;
+ halfedge_type fb;
+ halfedge_type fc;
+ halfedge_type fd;
+ fa.m_opposite = 1;
+ fb.m_opposite = 2;
+ fc.m_opposite = 3;
+ fd.m_opposite = 4;
+ halfedge_type array[] = { fa, fb, fc, fd };
+
+ // Construct a halfedge_gen object whose container contains array. Verify
+ // that halfedges_begin(), halfedges_end(), and num_halfedges() work.
+
+ container_type temp_con(array,array+4);
+ HalfedgeGen halfedgeGen;
+ halfedgeGen.m_container = temp_con;
+ BOOST_CHECK(( num_halfedges(halfedgeGen) == 4 ));
+ //BOOST_CHECK(( opposite(*halfedges_begin(halfedgeGen), halfedgeGen) == 1));
+ BOOST_CHECK(( halfedges_begin(halfedgeGen)->m_opposite == 1 ));
+ BOOST_CHECK(( (--halfedges_end(halfedgeGen))->m_opposite == 4 ));
+
+ //BOOST_CHECK(( halfedge(*halfedges_begin(halfedgeGen), halfedgeGen) == 1 ));
+ //BOOST_CHECK(( halfedge(*(--halfedges_end(halfedgeGen)), halfedgeGen) == 4 ));
+ return true;
+}
+
+template <typename HalfedgeGen, typename Base>
+bool halfedge_gen_requirements() {
+
+ typedef typename HalfedgeGen::halfedge_selector halfedge_selector;
+ typedef typename HalfedgeGen::halfedge_descriptor halfedge_descriptor;
+ typedef typename HalfedgeGen::halfedge_iterator halfedge_iterator;
+ typedef typename HalfedgeGen::halfedge_type halfedge_type;
+ typedef typename HalfedgeGen::container_type container_type;
+
+ halfedge_type fa(1, Base(1));
+ halfedge_type fb(2, Base(2));
+ halfedge_type fc(3, Base(3));
+ halfedge_type fd(4, Base(4));
+ halfedge_type array[] = { fa, fb, fc, fd }; (void) array;
+
+ // Same checks as before:
+ //BOOST_CHECK(( halfedge_gen_requirements_void<HalfedgeGen>() ));
+ container_type temp_con(array,array+4);
+ HalfedgeGen halfedgeGen;
+ halfedgeGen.m_container = temp_con;
+ BOOST_CHECK(( num_halfedges(halfedgeGen) == 4 ));
+
+ BOOST_CHECK(( halfedges_begin(halfedgeGen)->m_halfedgeLink == 1 ));
+ BOOST_CHECK(( (--halfedges_end(halfedgeGen))->m_halfedgeLink == 4 ));
+
+ //BOOST_CHECK(( halfedge(*halfedges_begin(halfedgeGen), halfedgeGen) == 1 ));
+ //BOOST_CHECK(( halfedge(*(--halfedges_end(halfedgeGen)), halfedgeGen) == 4 ));
+
+ // Plus: get the base back from the halfedges and making sure it matches.
+ BOOST_CHECK(( halfedges_begin(halfedgeGen)->base() == 1 ));
+ BOOST_CHECK(( (--halfedges_end(halfedgeGen))->base() == 4 ));
+
+ return true;
+}
+
+// ===========================================================================
+// USAGE EXAMPLE
+// ===========================================================================
+
+// The usage example is the component itself.
+
+// ===========================================================================
+// BOOST TEST APPARATUS
+// ===========================================================================
+
+int test_main(int, char **)
+{
+ BOOST_CHECK(( selection_requirements(halfedgeS<listS,
+ forwardS<next_in_facet_tag> >()) ));
+ BOOST_CHECK(( selection_requirements(halfedgeS<listS,
+ forwardS<next_at_source_tag> >()) ));
+ BOOST_CHECK(( selection_requirements(halfedgeS<listS,
+ forwardS<next_at_target_tag> >()) ));
+
+ BOOST_CHECK(( selection_requirements(halfedgeS<listS,
+ backwardS<prev_in_facet_tag> >()) ));
+ BOOST_CHECK(( selection_requirements(halfedgeS<listS,
+ backwardS<prev_at_source_tag> >()) ));
+ BOOST_CHECK(( selection_requirements(halfedgeS<listS,
+ backwardS<prev_at_target_tag> >()) ));
+
+ BOOST_CHECK(( selection_requirements(halfedgeS<listS,
+ bidirS<next_in_facet_tag, prev_in_facet_tag> >()) ));
+ BOOST_CHECK(( selection_requirements(halfedgeS<listS,
+ bidirS<next_at_source_tag, prev_at_source_tag> >()) ));
+ BOOST_CHECK(( selection_requirements(halfedgeS<listS,
+ bidirS<next_at_target_tag, prev_at_target_tag> >()) ));
+
+ // ==============
+ // check forwardS
+ // ==============
+ BOOST_CHECK(( halfedge_gen_requirements_void<
+ halfedge_gen<
+ halfedgeS<listS, forwardS<next_in_facet_tag> >,
+ int, int, int,
+ halfedge_ds_gen<
+ halfedgeS<listS, forwardS<next_in_facet_tag> >,
+ noVertexS, noFacetS>
+ ::config>
+ >() ));
+ BOOST_CHECK(( halfedge_gen_requirements_void<
+ halfedge_gen<
+ halfedgeS<listS, forwardS<next_at_source_tag> >,
+ int, int, int,
+ halfedge_ds_gen<
+ halfedgeS<listS, forwardS<next_at_source_tag> >,
+ noVertexS, noFacetS>
+ ::config>
+ >() ));
+ BOOST_CHECK(( halfedge_gen_requirements_void<
+ halfedge_gen<
+ halfedgeS<listS, forwardS<next_at_target_tag> >,
+ int, int, int,
+ halfedge_ds_gen<
+ halfedgeS<listS, forwardS<next_at_target_tag> >,
+ noVertexS, noFacetS>
+ ::config>
+ >() ));
+
+ // ===============
+ // check backwardS
+ // ===============
+
+ BOOST_CHECK(( halfedge_gen_requirements_void<
+ halfedge_gen<
+ halfedgeS<listS, backwardS<prev_in_facet_tag> >,
+ int, int, int,
+ halfedge_ds_gen<
+ halfedgeS<listS, backwardS<prev_in_facet_tag> >,
+ noVertexS, noFacetS>
+ ::config>
+ >() ));
+ BOOST_CHECK(( halfedge_gen_requirements_void<
+ halfedge_gen<
+ halfedgeS<listS, backwardS<prev_at_source_tag> >,
+ int, int, int,
+ halfedge_ds_gen<
+ halfedgeS<listS, backwardS<prev_at_source_tag> >,
+ noVertexS, noFacetS>
+ ::config>
+ >() ));
+ BOOST_CHECK(( halfedge_gen_requirements_void<
+ halfedge_gen<
+ halfedgeS<listS, backwardS<prev_at_target_tag> >,
+ int, int, int,
+ halfedge_ds_gen<
+ halfedgeS<listS, backwardS<prev_at_target_tag> >,
+ noVertexS, noFacetS>
+ ::config>
+ >() ));
+
+ // ============
+ // check bidirS
+ // ============
+
+ BOOST_CHECK(( halfedge_gen_requirements_void<
+ halfedge_gen<
+ halfedgeS<listS, bidirS<next_in_facet_tag,
+ prev_in_facet_tag> >,
+ int, int, int,
+ halfedge_ds_gen<
+ halfedgeS<listS, bidirS<next_in_facet_tag,
+ prev_in_facet_tag> >,
+ noVertexS, noFacetS>
+ ::config>
+ >() ));
+ BOOST_CHECK(( halfedge_gen_requirements_void<
+ halfedge_gen<
+ halfedgeS<listS, bidirS<next_at_source_tag,
+ prev_at_source_tag> >,
+ int, int, int,
+ halfedge_ds_gen<
+ halfedgeS<listS, bidirS<next_at_source_tag,
+ prev_at_source_tag> >,
+ noVertexS, noFacetS>
+ ::config>
+ >() ));
+ BOOST_CHECK(( halfedge_gen_requirements_void<
+ halfedge_gen<
+ halfedgeS<listS, bidirS<next_at_target_tag,
+ prev_at_target_tag> >,
+ int, int, int,
+ halfedge_ds_gen<
+ halfedgeS<listS, bidirS<next_at_target_tag,
+ prev_at_target_tag> >,
+ noVertexS, noFacetS>
+ ::config>
+ >() ));
+
+ // =============
+ // check vertexS
+ // =============
+
+ BOOST_CHECK(( halfedge_gen_requirements_void<
+ halfedge_gen<
+ halfedgeS<listS, forwardS<next_in_facet_tag> >,
+ int, int, int,
+ halfedge_ds_gen<
+ halfedgeS<listS, forwardS<next_in_facet_tag> >,
+ vertexS<listS,false,sourceS>, noFacetS>
+ ::config>
+ >() ));
+ BOOST_CHECK(( halfedge_gen_requirements_void<
+ halfedge_gen<
+ halfedgeS<listS, forwardS<next_in_facet_tag> >,
+ int, int, int,
+ halfedge_ds_gen<
+ halfedgeS<listS, forwardS<next_in_facet_tag> >,
+ vertexS<listS,false,targetS>, noFacetS>
+ ::config>
+ >() ));
+ BOOST_CHECK(( halfedge_gen_requirements_void<
+ halfedge_gen<
+ halfedgeS<listS, forwardS<next_in_facet_tag> >,
+ int, int, int,
+ halfedge_ds_gen<
+ halfedgeS<listS, forwardS<next_in_facet_tag> >,
+ vertexS<listS,true,sourceS>, noFacetS>
+ ::config>
+ >() ));
+ BOOST_CHECK(( halfedge_gen_requirements_void<
+ halfedge_gen<
+ halfedgeS<listS, forwardS<next_in_facet_tag> >,
+ int, int, int,
+ halfedge_ds_gen<
+ halfedgeS<listS, forwardS<next_in_facet_tag> >,
+ vertexS<listS,true,targetS>, noFacetS>
+ ::config>
+ >() ));
+
+ // ============
+ // check facetS
+ // ============
+
+ BOOST_CHECK(( halfedge_gen_requirements_void<
+ halfedge_gen<
+ halfedgeS<listS, forwardS<next_in_facet_tag> >,
+ int, int, int,
+ halfedge_ds_gen<
+ halfedgeS<listS, forwardS<next_in_facet_tag> >,
+ noVertexS, facetS<listS,true> >
+ ::config>
+ >() ));
+ BOOST_CHECK(( halfedge_gen_requirements_void<
+ halfedge_gen<
+ halfedgeS<listS, forwardS<next_in_facet_tag> >,
+ int, int, int,
+ halfedge_ds_gen<
+ halfedgeS<listS, forwardS<next_in_facet_tag> >,
+ noVertexS, facetS<listS,false> >
+ ::config>
+ >() ));
+/*
+ BOOST_CHECK(( halfedge_gen_requirements_noHalfedgeLink<
+ halfedge_gen<halfedgeS<listS,false>, int, int>, int >() ));
+ BOOST_CHECK(( halfedge_gen_requirements<
+ halfedge_gen<halfedgeS<listS,true>, int, int>, int >() ));
+
+ // BOOST_CHECK(( halfedge_gen_requirements<
+ // halfedge_gen<halfedgeS<listS,false>, int, custom_halfedge_base> >() ));
+
+ // BOOST_CHECK(( halfedge_gen_requirements<
+ // halfedge_gen<halfedgeS<listS,true>, int, custom_halfedge_base> >() ));
+
+ BOOST_CHECK(( selection_requirements(halfedgeS<vecS,true>()) ));
+ BOOST_CHECK(( selection_requirements(halfedgeS<vecS,false>()) ));
+
+ BOOST_CHECK(( halfedge_gen_requirements_void_noHalfedgeLink<
+ halfedge_gen<halfedgeS<vecS,false>, int, void> >() ));
+ BOOST_CHECK(( halfedge_gen_requirements_void<
+ halfedge_gen<halfedgeS<vecS,true>, int, void> >() ));
+
+ BOOST_CHECK(( halfedge_gen_requirements_noHalfedgeLink<
+ halfedge_gen<halfedgeS<vecS,false>, int, int>, int >() ));
+ BOOST_CHECK(( halfedge_gen_requirements<
+ halfedge_gen<halfedgeS<vecS,true>, int, int>, int >() ));
+
+ // BOOST_CHECK(( halfedge_gen_requirements<
+ // halfedge_gen<halfedgeS<vecS,false>, int, custom_halfedge_base> >() ));
+ // BOOST_CHECK(( halfedge_gen_requirements<
+ // halfedge_gen<halfedgeS<vecS,true>, int, custom_halfedge_base> >() ));
+ //BOOST_CHECK(( usageExample() ));
+ */
+ return 0;
+}
+
Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/vertex_selectors.hpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/vertex_selectors.hpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/vertex_selectors.hpp 2007-07-17 21:47:01 EDT (Tue, 17 Jul 2007)
@@ -254,7 +254,7 @@
// A selector (see the compenent 'container_selector') for the type of
// container that will be used to store the vertices.
- enum { has_vertex_links = HasVertexLink };
+ enum { has_vertex_link = HasVertexLink };
};
// ===================
Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/vertex_selectors.t.cpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/vertex_selectors.t.cpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/vertex_selectors.t.cpp 2007-07-17 21:47:01 EDT (Tue, 17 Jul 2007)
@@ -56,7 +56,7 @@
}
// ===========================================================================
-// CLASS FACET_GEN
+// CLASS VERTEX_GEN
// ===========================================================================
template<typename VertexGen>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk