|
Boost-Commit : |
From: hervebronnimann_at_[hidden]
Date: 2007-07-15 22:54:12
Author: hervebronnimann
Date: 2007-07-15 22:54:11 EDT (Sun, 15 Jul 2007)
New Revision: 7443
URL: http://svn.boost.org/trac/boost/changeset/7443
Log:
Cosmetica, small changes (see email)
Text files modified:
sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/facet_selectors.hpp | 12 ++--
sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/halfedge_selectors.hpp | 81 ++++++++++++++++++++++-----------------
sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/vertex_selectors.hpp | 26 ++++++-----
3 files changed, 66 insertions(+), 53 deletions(-)
Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/facet_selectors.hpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/facet_selectors.hpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/halfedge_ds/facet_selectors.hpp 2007-07-15 22:54:11 EDT (Sun, 15 Jul 2007)
@@ -153,9 +153,9 @@
namespace boost {
namespace hdstl {
- // ---------------------------
+ // ===========================
// classes noFacetS and facetS
- // ---------------------------
+ // ===========================
struct noFacetS {
// A selector that tells the 'halfedge_ds' that it should not store facets.
@@ -179,9 +179,9 @@
// contain a link to one of the halfedges in its facet cycle or not.
};
- // ------------------
+ // ==================
// class stored_facet
- // ------------------
+ // ==================
template <typename Base,
bool HasFacetLink = false,
@@ -212,9 +212,9 @@
: Base(base) {}
};
- // ---------------
+ // ===============
// class facet_gen
- // ---------------
+ // ===============
template <typename FacetS, typename HalfedgeDescriptor, typename FacetBase>
struct facet_gen {
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-15 22:54:11 EDT (Sun, 15 Jul 2007)
@@ -3,18 +3,16 @@
//@PURPOSE: Provide a concrete implementation of 'stored_halfedge' based on various configurations of 'halfedge_ds'.
//
//@CLASSES:
+// 'halfedgeS': defines configuration options for haledge storage and access
+// 'halfedge_gen': defines the stored type and accesors for a halfedge configuration
// 'stored_halfedge': defines the storage for a given halfedge configuration
-// 'halfedge_gen': defines the stored type and accesors for a halfedge
-// configuration
-// 'halfedgeS': inherits the options from one of 'forwardS', 'backwardS'
-// , or 'bidirS', and defined the container type.
//
//@SEE_ALSO: {hds_concepts.hpp, halfedge_ds.hpp}
//
//@DESCRIPTION: This file provides the 'stored_halfedge',
-//and the helper classes, which accepts many template parameters that can be
-//used to govern its implementation. These parameters can be chosen using the
-//'Config' class members (see 'halfedge_ds' component). Currently the
+// and the helper classes, which accepts many template parameters that can be
+// used to govern its implementation. These parameters can be chosen using the
+// 'Config' class members (see 'halfedge_ds' component). Currently the
// helper classes are as follows:
//
// - 'opposite_helper': class for configuring opposite access methods
@@ -55,13 +53,16 @@
namespace boost {
namespace hdstl {
+ // =========================
+ // halfedge selector classes
+ // =========================
+
template <typename ForwardCategory>
struct forwardS {
typedef forward_traversal_tag tag;
typedef ForwardCategory next_tag;
enum { is_forward = true };
enum { is_backward = false };
- enum { is_bidir = false };
};
template <typename BackwardCategory>
@@ -70,7 +71,6 @@
typedef BackwardCategory prev_tag;
enum { is_forward = false };
enum { is_backward = true };
- enum { is_bidir = false };
};
template <typename ForwardCategory, typename BackwardCategory>
@@ -78,18 +78,23 @@
typedef bidirectional_traversal_tag tag;
typedef ForwardCategory next_tag;
typedef BackwardCategory prev_tag;
- enum { is_forward = false };
- enum { is_backward = false };
- enum { is_bidir = true };
+ enum { is_forward = true };
+ enum { is_backward = true };
};
template <typename ContainerS,
typename TraversalS = forwardS<next_in_facet_tag> >
struct halfedgeS
-: public TraversalS {
+: public TraversalS
+{
typedef ContainerS container_selector;
};
-template<bool has_opposite_member = false, typename HalfedgeDescriptor=int>
+
+ // =======================
+ // halfedge helper classes
+ // =======================
+
+template<bool HasOppositeMember = false, typename HalfedgeDescriptor=int>
struct opposite_helper
{
};
@@ -100,7 +105,7 @@
HalfedgeDescriptor m_opposite;
};
-template<bool is_source=false, typename VertexDescriptor=int>
+template<bool IsSource=false, typename VertexDescriptor=int>
struct source_helper
{
};
@@ -111,7 +116,7 @@
VertexDescriptor m_source;
};
-template<bool is_target=false, typename VertexDescriptor=int>
+template<bool IsTarget=false, typename VertexDescriptor=int>
struct target_helper
{
};
@@ -122,16 +127,16 @@
VertexDescriptor m_target;
};
-template<bool supports_vertices, bool is_source, bool is_target,
- typename VertexDescriptor=int>
+template<bool SupportsVertices, bool IsSource, typename VertexDescriptor=int>
struct vertex_helper
{
};
-template<bool is_source, bool is_target, typename VertexDescriptor>
-struct vertex_helper<true, is_source, is_target, VertexDescriptor>
-: public source_helper<is_source>,
- public target_helper<is_target> {
+template<bool IsSource, typename VertexDescriptor>
+struct vertex_helper<true, IsSource, VertexDescriptor>
+: public source_helper<IsSource>
+, public target_helper<!IsTarget>
+{
};
template<bool supports_facets =false, typename FacetDescriptor=int>
@@ -145,45 +150,46 @@
FacetDescriptor m_facet;
};
-template<bool is_forward, bool is_backward, bool isbidir,
- typename HalfedgeDescriptor>
+template<bool IsForward, bool IsBackward, typename HalfedgeDescriptor>
struct traversal_helper
{
};
template<typename HalfedgeDescriptor>
-struct traversal_helper<true, false, false, HalfedgeDescriptor>
+struct traversal_helper<true, false, HalfedgeDescriptor>
{
HalfedgeDescriptor m_next;
};
template<typename HalfedgeDescriptor>
-struct traversal_helper<false, true, false, HalfedgeDescriptor>
+struct traversal_helper<false, true, HalfedgeDescriptor>
{
HalfedgeDescriptor m_prev;
};
template<typename HalfedgeDescriptor>
-struct traversal_helper<false, false, true, HalfedgeDescriptor>
-: public traversal_helper<true,false,false,HalfedgeDescriptor>,
- public traversal_helper<false,true,false,HalfedgeDescriptor>
+struct traversal_helper<true, true, HalfedgeDescriptor>
{
+ HalfedgeDescriptor m_next;
+ HalfedgeDescriptor m_prev;
};
+ // =====================
+ // class stored_halfedge
+ // =====================
+
template<typename HalfedgeDescriptor, typename VertexDescriptor,
typename FacetDescriptor, typename Config>
struct stored_halfedge
-: public opposite_helper<Config::halfedge_has_opposite_member,
- HalfedgeDescriptor>,
+: public opposite_helper<Config::halfedge_has_opposite_member, HalfedgeDescriptor>,
public vertex_helper<Config::halfedge_supports_vertices,
Config::is_source, Config::is_target, VertexDescriptor>,
public facet_helper<Config::halfedge_supports_facets, FacetDescriptor>,
- public traversal_helper<Config::is_forward, Config::is_backward,
- Config::is_bidir, HalfedgeDescriptor>
+ public traversal_helper<Config::is_forward, Config::is_backward, HalfedgeDescriptor>
{
// This struct implements a stored_halfedge which can be configured based
- // on the 'halfedge_ds::config' selections. Based on the configuration
- // options, this stored_halfedge has the following options as members:
+ // on the 'halfedge_ds::Config' selections. This stored_halfedge has the
+ // following options as members:
// - having an opposite member or not
// - having a next/prev pointer or not, or having both
// - having a vertex descriptor
@@ -196,11 +202,16 @@
};
+ // ==================
+ // class halfedge_gen
+ // ==================
+
template <typename HalfedgeS, typename HalfedgeDescriptor,
typename VertexDescriptor, typename FacetDescriptor, typename Config>
struct halfedge_gen {
};
+// SPECIALIZATIONS
template <typename ContainerS, typename TraversalS,typename HalfedgeDescriptor,
typename VertexDescriptor, typename FacetDescriptor, typename Config>
struct halfedge_gen<halfedgeS<ContainerS,TraversalS>, HalfedgeDescriptor,
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-15 22:54:11 EDT (Sun, 15 Jul 2007)
@@ -5,17 +5,16 @@
//@CLASSES:
// 'vertexS': defines configuration options for vertex storage and access
// 'stored_vertex': defines the storage for a given vertex configuration
-// 'vertex_gen': defines the stored type and accessors for a vertex
-// configuration
+// 'vertex_gen': defines the stored type and accessors for a vertex configuration
//
//@SEE_ALSO: {hds_concepts.hpp, halfedge_ds.hpp}
//
//@DESCRIPTION: This file provides the 'vertexS' selector class for
//configurations related to vertex properties. These selector types are
//suitable to use for the 'VertexS' template parameter to the 'halfedge_ds'
-//class tempalte. Currently there are two vertex selectors:
+//class template. Currently there are two vertex selectors:
//
-// - 'noVertexS': means that there should be no facets in the corresponding
+// - 'noVertexS': means that there should be no vertices in the corresponding
// 'hafedge_ds' data structure.
//
// - 'vertexS<ContainerS, HasVertexLink, VertexType>': (where 'ContainerS' can
@@ -42,7 +41,7 @@
// vertex needs to know:
// - whether halfedge_ds should store a link to source or target vertex.
// - whether it stores a vertex link or not.
-// - the halfedge descriptor: in order to store the vertex link. Since it is
+// - the halfedge descriptor: in order to store the vertex link. Since it is
// not needed when the vertex stores no vertex link, we make it integer in
// that case.
// - any extra properties that need to get contained by the vertex as member. We
@@ -77,7 +76,7 @@
// }
// };
//..
-// We use base_vertexS to select the vertex access method. Base class defines
+// We use 'base_vertexS' to select the vertex access method. Base class defines
// nothing.
//..
// template <typename VertexType>
@@ -136,7 +135,7 @@
// HalfedgeDescriptor> {
// // This specialization is a vertex generator for 'vertexS' that takes a
// // vertex selector, vertex type selector , halfedge descriptor and uses
-// // the container_selectors compenent to define a suitable base for the
+// // the container_selectors component to define a suitable base for the
// // 'halfedge_ds_gen' that implements all the functionality of the
// // 'halfedge_ds' related to vertices.
//
@@ -196,6 +195,10 @@
namespace boost {
namespace hdstl {
+ // =======================
+ // vertex selector classes
+ // =======================
+
struct sourceS {
// A selector that tells the 'halfedge_ds' that each halfedge should keep
// a pointer to its source vertex.
@@ -254,10 +257,9 @@
enum { has_vertex_links = HasVertexLink };
};
-
- // ------------------
+ // ==================
// class stored_facet
- // ------------------
+ // ==================
template <bool HasVertexLink = false, typename HalfedgeDescriptor = int>
struct stored_vertex {
@@ -282,9 +284,9 @@
stored_vertex(HalfedgeDescriptor = 0) {
}
};
- // ---------------
+ // ================
// class vertex_gen
- // ---------------
+ // ================
template <typename VertexS, typename HalfedgeDescriptor>
struct vertex_gen {
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