|
Boost-Commit : |
From: huseyinakcan_at_[hidden]
Date: 2007-08-05 16:51:07
Author: huseyinakcan
Date: 2007-08-05 16:51:00 EDT (Sun, 05 Aug 2007)
New Revision: 38466
URL: http://svn.boost.org/trac/boost/changeset/38466
Log:
base functions for euler operators.
Added:
sandbox/SOC/2007/geometry/libs/hdstl/dev/euler/
sandbox/SOC/2007/geometry/libs/hdstl/dev/euler/Makefile (contents, props changed)
sandbox/SOC/2007/geometry/libs/hdstl/dev/euler/base_functions.cpp (contents, props changed)
sandbox/SOC/2007/geometry/libs/hdstl/dev/euler/base_functions.hpp (contents, props changed)
sandbox/SOC/2007/geometry/libs/hdstl/dev/euler/base_functions.t.cpp (contents, props changed)
sandbox/SOC/2007/geometry/libs/hdstl/dev/euler/boost/
sandbox/SOC/2007/geometry/libs/hdstl/dev/euler/boost/hdstl (contents, props changed)
sandbox/SOC/2007/geometry/libs/hdstl/dev/euler/euler_operators.hpp (contents, props changed)
Added: sandbox/SOC/2007/geometry/libs/hdstl/dev/euler/Makefile
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/euler/Makefile 2007-08-05 16:51:00 EDT (Sun, 05 Aug 2007)
@@ -0,0 +1,58 @@
+CXX=g++
+CXXFLAGS=-pedantic -W -Wall -I.
+
+LD=g++
+
+TARGET=dbg_exc_mt
+
+PACKAGE_OBJECTS=base_functions.o
+
+PACKAGE_LIBRARY=libhalfedge_ds.a
+
+TEST_DRIVERS=base_functions.t
+
+.SUFFIXES:
+.SUFFIXES: ${TARGET}.o .o .cpp .hpp
+
+all: package_library test
+
+
+### BUILDING PACKAGE LIBRARY AND DEPENDENCIES
+
+package_library: ${PACKAGE_OBJECTS}
+ ar -rv ${PACKAGE_LIBRARY} ${PACKAGE_OBJECTS}
+
+%.o: %.cpp %.h
+ ${CXX} ${CXXFLAGS} ${CXXINCLUDES} -c -o $*.o $<
+
+
+base_functions.o:
+
+
+### BUILDING TEST DRIVERS AND DEPENDENCIES OF TEST DRIVER
+
+test: ${TEST_DRIVERS}
+ for file in ${TEST_DRIVERS}; do echo "******* TESTING $$file *********"; ./$$file; done
+
+%.t: %.t.o %.o
+ ${LD} ${LDFLAGS} -o $*.t $^
+
+base_functions.t.o:
+
+%.t.o: %.t.cpp %.hpp
+ ${CXX} ${CXXFLAGS} ${CXXINCLUDES} -c -o $*.t.o $<
+
+base_functions.t:
+
+## UTILITIES
+
+clean: realclean testclean
+
+testclean:
+ - rm *.t.o
+ - rm *.t
+
+realclean:
+ - rm *.o
+ - rm ${PACKAGE_LIBRARY}
+
Added: sandbox/SOC/2007/geometry/libs/hdstl/dev/euler/base_functions.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/euler/base_functions.cpp 2007-08-05 16:51:00 EDT (Sun, 05 Aug 2007)
@@ -0,0 +1,3 @@
+//base_functions.cpp -*- C++ -*-
+
+#include <boost/hdstl/euler/base_functions.hpp>
Added: sandbox/SOC/2007/geometry/libs/hdstl/dev/euler/base_functions.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/euler/base_functions.hpp 2007-08-05 16:51:00 EDT (Sun, 05 Aug 2007)
@@ -0,0 +1,239 @@
+//base_functions.hpp -*- C++ -*-
+//
+//@PURPOSE: Provide base free functions for accessing and manipulating halfedges, vertices and facets.
+//
+//@DESCRIPTION: This file provides base free functions for accessing and manipulating halfedges, vertices and facets.
+// The base functions are the building blocks for the Euler operators defined in 'euler_operators.hpp'.
+// The list of these functions are as follows:
+//
+// - stitch_cycle: Sets the next and prev links of the given two halfedges 'h' and 'g' based on the configuration
+// of data structure 'hds'.
+// - stitch_vertex: Sets the vertex 'v' as the 'source' or the 'target' vertex of halfedge 'h' and defines a vertex
+// link from the halfedge 'h' to vertex 'v' if the vertex links are defined in 'hds'
+// - stitch_facet: Sets the facet 'f' as the facet on the left for halfedge 'h' and defines a facet link from
+// the halfedge 'h' to facet 'f' if the facet links are defined in 'hds'
+//
+//@SEE_ALSO: {hds_concepts.hpp, halfedge_selectors.hpp, vertex_selectors.hpp, facet_selectors.hpp}
+
+
+#ifndef BOOST_HDSTL_BASE_FUNCTIONS_HPP
+#define BOOST_HDSTL_BASE_FUNCTIONS_HPP 1
+
+#include <boost/hdstl/halfedge_ds/halfedge_functions.hpp>
+#include <boost/hdstl/halfedge_ds/facet_functions.hpp>
+#include <boost/hdstl/halfedge_ds/vertex_functions.hpp>
+
+namespace boost {
+namespace hdstl {
+
+// \cond
+namespace detail {
+
+template<typename HalfedgeGen, typename Tag=next_in_facet_tag>
+struct stitch_cycle_helper
+{
+ static void
+ stitch(typename HalfedgeGen::halfedge_descriptor h, typename HalfedgeGen::halfedge_descriptor g, HalfedgeGen& hds)
+ {
+ set_next_in_facet(h,g,hds);
+ }
+};
+
+template<typename HalfedgeGen>
+struct stitch_cycle_helper<HalfedgeGen, prev_in_facet_tag>
+{
+ static void
+ stitch(typename HalfedgeGen::halfedge_descriptor h, typename HalfedgeGen::halfedge_descriptor g, HalfedgeGen& hds)
+ {
+ set_prev_in_facet(h,g,hds);
+ }
+};
+
+template<typename HalfedgeGen>
+struct stitch_cycle_helper<HalfedgeGen, next_at_source_tag>
+{
+ static void
+ stitch(typename HalfedgeGen::halfedge_descriptor h, typename HalfedgeGen::halfedge_descriptor g, HalfedgeGen& hds)
+ {
+ set_next_at_source(h,g,hds);
+ }
+};
+
+template<typename HalfedgeGen>
+struct stitch_cycle_helper<HalfedgeGen, prev_at_source_tag>
+{
+ static void
+ stitch(typename HalfedgeGen::halfedge_descriptor h, typename HalfedgeGen::halfedge_descriptor g, HalfedgeGen& hds)
+ {
+ set_prev_at_source(h,g,hds);
+ }
+};
+
+template<typename HalfedgeGen>
+struct stitch_cycle_helper<HalfedgeGen, next_at_target_tag>
+{
+ static void
+ stitch(typename HalfedgeGen::halfedge_descriptor h, typename HalfedgeGen::halfedge_descriptor g, HalfedgeGen& hds)
+ {
+ set_next_at_target(h,g,hds);
+ }
+};
+
+template<typename HalfedgeGen>
+struct stitch_cycle_helper<HalfedgeGen, prev_at_target_tag>
+{
+ static void
+ stitch(typename HalfedgeGen::halfedge_descriptor h, typename HalfedgeGen::halfedge_descriptor g, HalfedgeGen& hds)
+ {
+ set_prev_at_target(h,g,hds);
+ }
+};
+
+template <typename HalfedgeGen, bool IsForward=true, bool IsBackward=false>
+struct stitch_cycle_dir_helper
+ // Helper for forward HDS, uses the nested 'next_tag' to identify the primary accessor and selects
+ // the set functions for the appropriate accessor.
+{
+ static void
+ stitch_cycle_dir(typename HalfedgeGen::halfedge_descriptor h, typename HalfedgeGen::halfedge_descriptor g,
+ HalfedgeGen& hds)
+ {
+ stitch_cycle_helper<HalfedgeGen, typename HalfedgeGen::halfedge_selector::next_tag>::stitch(h,g,hds);
+ }
+};
+
+template <typename HalfedgeGen>
+struct stitch_cycle_dir_helper<HalfedgeGen, false, true>
+ // Helper for backward HDS, uses the nested 'prev_tag' to identify the primary accessor and selects
+ // the set functions for the appropriate accessor.
+{
+ static void
+ stitch_cycle_dir(typename HalfedgeGen::halfedge_descriptor h, typename HalfedgeGen::halfedge_descriptor g,
+ HalfedgeGen& hds)
+ {
+ stitch_cycle_helper<HalfedgeGen, typename HalfedgeGen::halfedge_selector::prev_tag>::stitch(h,g,hds);
+ }
+};
+
+template <typename HalfedgeGen>
+struct stitch_cycle_dir_helper<HalfedgeGen, true, true>
+ // Helper for bidirectional HDS, uses the nested 'next_tag' and 'prev_tag' to identify the primary accessors
+ // and selects the set functions for the appropriate accessors.
+{
+ static void
+ stitch_cycle_dir(typename HalfedgeGen::halfedge_descriptor h, typename HalfedgeGen::halfedge_descriptor g,
+ HalfedgeGen& hds)
+ {
+ stitch_cycle_helper<HalfedgeGen, typename HalfedgeGen::halfedge_selector::next_tag>::stitch(h,g,hds);
+ stitch_cycle_helper<HalfedgeGen, typename HalfedgeGen::halfedge_selector::prev_tag>::stitch(h,g,hds);
+ }
+};
+
+} // end namespace detail
+// \endcond
+
+template <typename HalfedgeGen>
+void
+stitch_cycle(typename HalfedgeGen::halfedge_descriptor h, typename HalfedgeGen::halfedge_descriptor g, HalfedgeGen& hds)
+ // Sets the appropriate accessor relations between h and g, based on the configuration of the 'hds'
+{
+ typedef typename HalfedgeGen::halfedge_selector halfedge_selector;
+ detail::stitch_cycle_dir_helper<HalfedgeGen, halfedge_selector::is_forward,
+ halfedge_selector::is_backward
+ >::stitch_cycle_dir(h,g,hds);
+}
+
+// \cond
+namespace detail {
+
+template <typename HalfedgeGen, typename FacetGen, bool HasFacetLink=false>
+struct stitch_facet_helper
+ // Helper for setting 'f' as the facet on the left of halfedge 'h', when 'fds' is configured without facet links.
+{
+ static void
+ stitch(typename HalfedgeGen::halfedge_descriptor h, typename FacetGen::facet_descriptor f, HalfedgeGen& hds,
+ FacetGen& fds)
+ {
+ (void) fds;
+ set_facet(h,f,hds);
+ }
+};
+
+template <typename HalfedgeGen, typename FacetGen>
+struct stitch_facet_helper<HalfedgeGen, FacetGen, true>
+ // Helper for setting 'f' as the facet on the left of halfedge 'h', when 'fds' is configured with facet links.
+{
+ static void
+ stitch(typename HalfedgeGen::halfedge_descriptor h, typename FacetGen::facet_descriptor f, HalfedgeGen& hds,
+ FacetGen& fds)
+ {
+ set_facet(h,f,hds);
+ FacetGen::ContainerGen::value(f, fds.m_container).m_facetLink = h;
+ }
+};
+
+} // end namespace detail
+
+// \endcond
+
+template<typename HalfedgeGen, typename FacetGen>
+void
+stitch_facet(typename HalfedgeGen::halfedge_descriptor h, typename FacetGen::facet_descriptor f,
+ HalfedgeGen& hds, FacetGen& fds)
+ // Set facet 'f' as the facet on the left of halfedge 'h' and set the facet link from 'h' to 'f' if the
+ // 'fds' is configured with facet links.
+{
+ detail::stitch_facet_helper<HalfedgeGen, FacetGen, FacetGen::facet_selector::has_facet_links
+ >::stitch(h,f,hds,fds);
+}
+
+// \cond
+namespace detail {
+
+template <typename HalfedgeGen, typename VertexGen, bool HasVertexLink=false>
+struct stitch_vertex_helper
+ // Helper for setting 'v' as the source or target vertex of halfedge 'h', when 'vds' is configured without
+ // vertex links.
+{
+ static void
+ stitch(typename HalfedgeGen::halfedge_descriptor h, typename VertexGen::vertex_descriptor v, HalfedgeGen& hds,
+ VertexGen& vds)
+ {
+ (void) vds;
+ set_vertex(h,v,hds);
+ }
+};
+
+template <typename HalfedgeGen, typename VertexGen>
+struct stitch_vertex_helper<HalfedgeGen, VertexGen, true>
+ // Helper for setting 'v' as the source or target vertex of halfedge 'h', when 'vds' is configured with
+ // vertex links.
+{
+ static void
+ stitch(typename HalfedgeGen::halfedge_descriptor h, typename VertexGen::vertex_descriptor v, HalfedgeGen& hds,
+ VertexGen& vds)
+ {
+ set_vertex(h,v,hds);
+ VertexGen::ContainerGen::value(v, vds.m_container).m_vertexLink = h;
+ }
+};
+
+} // end namespace detail
+
+// \endcond
+
+template<typename HalfedgeGen, typename VertexGen>
+void
+stitch_vertex(typename HalfedgeGen::halfedge_descriptor h, typename VertexGen::vertex_descriptor v,
+ HalfedgeGen& hds, VertexGen& vds)
+ // Set vertex 'v' as the source or target vertex of halfedge 'h' and set the vertex link from 'h' to 'v'
+ // if the 'vds' is configured with vertex links.
+{
+ detail::stitch_vertex_helper<HalfedgeGen, VertexGen, VertexGen::vertex_selector::has_vertex_links
+ >::stitch(h,v,hds,vds);
+}
+
+} // end namespace hdstl
+} // end namespace boost
+
+#endif
Added: sandbox/SOC/2007/geometry/libs/hdstl/dev/euler/base_functions.t.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/euler/base_functions.t.cpp 2007-08-05 16:51:00 EDT (Sun, 05 Aug 2007)
@@ -0,0 +1,349 @@
+//base_functions.t.cpp -*- C++ -*-
+//
+//@OVERVIEW:
+//
+//@TEST_PLAN:
+//
+
+#include <boost/hdstl/euler/base_functions.hpp>
+#include <boost/hdstl/halfedge_ds/halfedge_functions.hpp>
+#include <boost/hdstl/halfedge_ds/halfedge_selectors.hpp>
+#include <boost/hdstl/halfedge_ds/facet_functions.hpp>
+#include <boost/hdstl/halfedge_ds/vertex_functions.hpp>
+#include <boost/hdstl/halfedge_ds/meta_functions.hpp>
+#include <boost/pending/ct_if.hpp>
+#include <boost/test/minimal.hpp>
+
+#include <set>
+#include <string>
+#include <vector>
+
+using namespace boost::hdstl;
+using namespace std;
+
+// ===========================================================================
+// CLASS HALFEDGE_GEN
+// ===========================================================================
+
+typedef void* halfedge_ptr;
+
+template <typename HalfedgeS, typename VertexS, typename FacetS>
+struct halfedge_config {
+ // This halfedge_config to identically replace the halfedge_ds_gen::config
+ // and reproduced here for test purposes only. Note that this tests are
+ // not for the config class, but the halfedge_selectors, so config will
+ // be tested in its own package.
+
+ enum {
+ halfedge_has_opposite_member = !meta_is_same<
+ typename HalfedgeS::container_selector, vecS>::value,
+ is_forward = HalfedgeS::is_forward,
+ is_backward = HalfedgeS::is_backward,
+ halfedge_supports_vertices = !meta_is_same<VertexS,noVertexS>::value,
+ is_source = VertexS::is_source,
+ halfedge_supports_facets = !meta_is_same<FacetS,noFacetS>::value
+ };
+ typedef typename boost::ct_if<halfedge_has_opposite_member,
+ halfedge_ptr, std::size_t>::type halfedge_descriptor;
+};
+
+template <typename HalfedgeS>
+struct halfedge_config<HalfedgeS, noVertexS, noFacetS> {
+ enum {
+ halfedge_has_opposite_member = !meta_is_same<
+ typename HalfedgeS::container_selector, vecS>::value,
+ is_forward = HalfedgeS::is_forward,
+ is_backward = HalfedgeS::is_backward,
+ halfedge_supports_vertices = false,
+ is_source = false,
+ halfedge_supports_facets = false
+ };
+ typedef typename boost::ct_if<halfedge_has_opposite_member,
+ halfedge_ptr, std::size_t>::type halfedge_descriptor;
+};
+
+template <typename HalfedgeS, typename FacetS>
+struct halfedge_config<HalfedgeS, noVertexS, FacetS> {
+ enum {
+ halfedge_has_opposite_member = !meta_is_same<
+ typename HalfedgeS::container_selector, vecS>::value,
+ is_forward = HalfedgeS::is_forward,
+ is_backward = HalfedgeS::is_backward,
+ halfedge_supports_vertices = false,
+ is_source = false,
+ halfedge_supports_facets = !meta_is_same<FacetS,noFacetS>::value
+ };
+ typedef typename boost::ct_if<halfedge_has_opposite_member,
+ halfedge_ptr, std::size_t>::type halfedge_descriptor;
+};
+
+template <typename HalfedgeS, typename VertexS>
+struct halfedge_config<HalfedgeS, VertexS, noFacetS> {
+ enum {
+ halfedge_has_opposite_member = !meta_is_same<
+ typename HalfedgeS::container_selector, vecS>::value,
+ is_forward = HalfedgeS::is_forward,
+ is_backward = HalfedgeS::is_backward,
+ halfedge_supports_vertices = !meta_is_same<VertexS,noVertexS>::value,
+ is_source = VertexS::is_source,
+ halfedge_supports_facets = false
+ };
+ typedef typename boost::ct_if<halfedge_has_opposite_member,
+ halfedge_ptr, std::size_t>::type halfedge_descriptor;
+};
+
+template <typename HalfedgeGen>
+void create_hds(HalfedgeGen& halfedgeGen){
+ // 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::ContainerGen container_gen;
+ typedef typename HalfedgeGen::ContainerGen::selector container_selector;
+ typedef typename HalfedgeGen::container_type container_type;
+
+ halfedge_type fa;
+ halfedge_type fb;
+ halfedge_type array[] = { fa, fb};
+
+ // Construct a halfedge_gen object whose container contains array. Verify
+ // that halfedges_begin(), halfedges_end(), and num_halfedges() work.
+
+ container_type halfedges(array, array+2);
+ halfedgeGen.m_container = halfedges;
+}
+
+template <typename HalfedgeGen, typename TagS>
+bool halfedge_set_next_test(TagS const&) {
+
+ typedef typename HalfedgeGen::halfedge_descriptor halfedge_descriptor;
+ typedef typename HalfedgeGen::halfedge_iterator halfedge_iterator;
+ typedef typename HalfedgeGen::ContainerGen::selector container_selector;
+
+ HalfedgeGen halfedgeGen;
+ create_hds(halfedgeGen);
+
+ halfedge_iterator begin = halfedges_begin(halfedgeGen);
+ halfedge_descriptor ha = *begin;
+ halfedge_descriptor hb = *(++begin);
+
+ stitch_cycle(ha, hb, halfedgeGen);
+
+ BOOST_CHECK(( next_in_facet(ha, halfedgeGen) == hb ));
+ return true;
+}
+
+template <typename HalfedgeGen>
+bool halfedge_set_next_test(next_at_source_tag const&) {
+
+ typedef typename HalfedgeGen::halfedge_descriptor halfedge_descriptor;
+ typedef typename HalfedgeGen::halfedge_iterator halfedge_iterator;
+ typedef typename HalfedgeGen::ContainerGen::selector container_selector;
+
+ HalfedgeGen halfedgeGen;
+ create_hds(halfedgeGen);
+
+ halfedge_iterator begin = halfedges_begin(halfedgeGen);
+ halfedge_descriptor ha = *begin;
+ halfedge_descriptor hb = *(++begin);
+
+ stitch_cycle(ha, hb, halfedgeGen);
+
+ BOOST_CHECK(( next_at_source(ha, halfedgeGen) == hb ));
+
+ return true;
+}
+
+template <typename HalfedgeGen>
+bool halfedge_set_next_test(next_at_target_tag const&) {
+
+ typedef typename HalfedgeGen::halfedge_descriptor halfedge_descriptor;
+ typedef typename HalfedgeGen::halfedge_iterator halfedge_iterator;
+ typedef typename HalfedgeGen::ContainerGen::selector container_selector;
+
+ HalfedgeGen halfedgeGen;
+ create_hds(halfedgeGen);
+
+ halfedge_iterator begin = halfedges_begin(halfedgeGen);
+ halfedge_descriptor ha = *begin;
+ halfedge_descriptor hb = *(++begin);
+
+ stitch_cycle(ha, hb, halfedgeGen);
+
+ BOOST_CHECK(( next_at_target(ha, halfedgeGen) == hb ));
+
+ return true;
+}
+
+template <typename HalfedgeGen, typename TagS>
+bool halfedge_set_prev_test(TagS const&) {
+
+ typedef typename HalfedgeGen::halfedge_descriptor halfedge_descriptor;
+ typedef typename HalfedgeGen::halfedge_iterator halfedge_iterator;
+ typedef typename HalfedgeGen::ContainerGen::selector container_selector;
+
+ HalfedgeGen halfedgeGen;
+ create_hds(halfedgeGen);
+
+ halfedge_iterator begin = halfedges_begin(halfedgeGen);
+ halfedge_descriptor ha = *begin;
+ halfedge_descriptor hb = *(++begin);
+
+ stitch_cycle(ha, hb, halfedgeGen);
+
+ BOOST_CHECK(( prev_in_facet(ha, halfedgeGen) == hb ));
+
+ return true;
+}
+
+template <typename HalfedgeGen>
+bool halfedge_set_prev_test(prev_at_source_tag const&) {
+
+ typedef typename HalfedgeGen::halfedge_descriptor halfedge_descriptor;
+ typedef typename HalfedgeGen::halfedge_iterator halfedge_iterator;
+ typedef typename HalfedgeGen::ContainerGen::selector container_selector;
+
+ HalfedgeGen halfedgeGen;
+ create_hds(halfedgeGen);
+
+ halfedge_iterator begin = halfedges_begin(halfedgeGen);
+ halfedge_descriptor ha = *begin;
+ halfedge_descriptor hb = *(++begin);
+
+ stitch_cycle(ha, hb, halfedgeGen);
+
+ BOOST_CHECK(( prev_at_source(ha, halfedgeGen) == hb ));
+
+ return true;
+}
+
+template <typename HalfedgeGen>
+bool halfedge_set_prev_test(prev_at_target_tag const&) {
+
+ typedef typename HalfedgeGen::halfedge_descriptor halfedge_descriptor;
+ typedef typename HalfedgeGen::halfedge_iterator halfedge_iterator;
+ typedef typename HalfedgeGen::ContainerGen::selector container_selector;
+
+ HalfedgeGen halfedgeGen;
+ create_hds(halfedgeGen);
+
+ halfedge_iterator begin = halfedges_begin(halfedgeGen);
+ halfedge_descriptor ha = *begin;
+ halfedge_descriptor hb = *(++begin);
+
+ stitch_cycle(ha, hb, halfedgeGen);
+
+ BOOST_CHECK(( prev_at_target(ha, halfedgeGen) == hb ));
+
+ return true;
+}
+
+// ===========================================================================
+// BOOST TEST APPARATUS
+// ===========================================================================
+
+template <typename ContainerS, typename TraversalS, typename VertexS, typename FacetS>
+bool test_set_next_functions()
+{
+
+ typedef typename TraversalS::next_tag next_tag;
+ //check set_next_... functions
+ BOOST_CHECK(( halfedge_set_next_test<
+ halfedge_gen<
+ halfedgeS<ContainerS, TraversalS>,
+ int, int,
+ halfedge_config<
+ halfedgeS<ContainerS, TraversalS>,
+ VertexS, FacetS> >
+ >(next_tag()) ));
+ return true;
+}
+
+template <typename ContainerS, typename TraversalS, typename VertexS, typename FacetS>
+bool test_set_prev_functions()
+{
+
+ typedef typename TraversalS::prev_tag prev_tag;
+ //check set_prev_... functions
+ BOOST_CHECK(( halfedge_set_prev_test<
+ halfedge_gen<
+ halfedgeS<ContainerS, TraversalS>,
+ int, int,
+ halfedge_config<
+ halfedgeS<ContainerS, TraversalS>,
+ VertexS, FacetS> >
+ >(prev_tag()) ));
+ return true;
+}
+
+template<typename ContainerS, typename VertexS, typename FacetS>
+bool test_set_functions_all()
+{
+
+ BOOST_CHECK(( test_set_next_functions<ContainerS, forwardS<next_in_facet_tag>, VertexS, FacetS>() ));
+ BOOST_CHECK(( test_set_next_functions<ContainerS, forwardS<next_at_source_tag>, VertexS, FacetS>() ));
+ BOOST_CHECK(( test_set_next_functions<ContainerS, forwardS<next_at_target_tag>, VertexS, FacetS>() ));
+
+ BOOST_CHECK(( test_set_prev_functions<ContainerS, backwardS<prev_in_facet_tag>, VertexS, FacetS>() ));
+ BOOST_CHECK(( test_set_prev_functions<ContainerS, backwardS<prev_at_source_tag>, VertexS, FacetS>() ));
+ BOOST_CHECK(( test_set_prev_functions<ContainerS, backwardS<prev_at_target_tag>, VertexS, FacetS>() ));
+
+ BOOST_CHECK(( test_set_next_functions<ContainerS, bidirS<next_in_facet_tag, prev_in_facet_tag>,
+ VertexS, FacetS>() ));
+ BOOST_CHECK(( test_set_next_functions<ContainerS, bidirS<next_in_facet_tag, prev_at_source_tag>,
+ VertexS, FacetS>() ));
+ BOOST_CHECK(( test_set_next_functions<ContainerS, bidirS<next_in_facet_tag, prev_at_target_tag>,
+ VertexS, FacetS>() ));
+
+ BOOST_CHECK(( test_set_next_functions<ContainerS, bidirS<next_at_source_tag, prev_in_facet_tag>,
+ VertexS, FacetS>() ));
+ BOOST_CHECK(( test_set_next_functions<ContainerS, bidirS<next_at_source_tag, prev_at_source_tag>,
+ VertexS, FacetS>() ));
+ BOOST_CHECK(( test_set_next_functions<ContainerS, bidirS<next_at_source_tag, prev_at_target_tag>,
+ VertexS, FacetS>() ));
+
+ BOOST_CHECK(( test_set_next_functions<ContainerS, bidirS<next_at_target_tag, prev_in_facet_tag>,
+ VertexS, FacetS>() ));
+ BOOST_CHECK(( test_set_next_functions<ContainerS, bidirS<next_at_target_tag, prev_at_source_tag>,
+ VertexS, FacetS>() ));
+ BOOST_CHECK(( test_set_next_functions<ContainerS, bidirS<next_at_target_tag, prev_at_target_tag>,
+ VertexS, FacetS>() ));
+
+ BOOST_CHECK(( test_set_prev_functions<ContainerS, bidirS<next_in_facet_tag, prev_in_facet_tag>,
+ VertexS, FacetS>() ));
+ BOOST_CHECK(( test_set_prev_functions<ContainerS, bidirS<next_in_facet_tag, prev_at_source_tag>,
+ VertexS, FacetS>() ));
+ BOOST_CHECK(( test_set_prev_functions<ContainerS, bidirS<next_in_facet_tag, prev_at_target_tag>,
+ VertexS, FacetS>() ));
+
+ BOOST_CHECK(( test_set_prev_functions<ContainerS, bidirS<next_at_source_tag, prev_in_facet_tag>,
+ VertexS, FacetS>() ));
+ BOOST_CHECK(( test_set_prev_functions<ContainerS, bidirS<next_at_source_tag, prev_at_source_tag>,
+ VertexS, FacetS>() ));
+ BOOST_CHECK(( test_set_prev_functions<ContainerS, bidirS<next_at_source_tag, prev_at_target_tag>,
+ VertexS, FacetS>() ));
+
+ BOOST_CHECK(( test_set_prev_functions<ContainerS, bidirS<next_at_target_tag, prev_in_facet_tag>,
+ VertexS, FacetS>() ));
+ BOOST_CHECK(( test_set_prev_functions<ContainerS, bidirS<next_at_target_tag, prev_at_source_tag>,
+ VertexS, FacetS>() ));
+ BOOST_CHECK(( test_set_prev_functions<ContainerS, bidirS<next_at_target_tag, prev_at_target_tag>,
+ VertexS, FacetS>() ));
+ return true;
+}
+
+template<typename ContainerS>
+bool test_all()
+{
+ BOOST_CHECK(( test_set_functions_all<ContainerS, noVertexS, noFacetS>() ));
+ return true;
+}
+
+int test_main(int, char**)
+{
+ BOOST_CHECK(( test_all<listS>() ));
+ BOOST_CHECK(( test_all<vecS>() ));
+
+ return 0;
+}
Added: sandbox/SOC/2007/geometry/libs/hdstl/dev/euler/boost/hdstl
==============================================================================
Binary file. No diff available.
Added: sandbox/SOC/2007/geometry/libs/hdstl/dev/euler/euler_operators.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/euler/euler_operators.hpp 2007-08-05 16:51:00 EDT (Sun, 05 Aug 2007)
@@ -0,0 +1,14 @@
+namespace boost {
+namespace hdstl {
+
+template <typename HDS>
+HDS::halfedge_descriptor
+create_lens(typename HDS::facet_descriptor f1, typename HDS::facet_descriptor f2
+ , typename HDS::vertex_descriptor v1, typename HDS::vertex_descriptor v2
+ , typename HDS::halfedge_descriptor h, HDS& hds)
+{
+
+}
+
+} // end namespace hdstl
+} // end namespace boost
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