Boost logo

Boost-Commit :

From: huseyinakcan_at_[hidden]
Date: 2007-06-11 23:39:52


Author: huseyinakcan
Date: 2007-06-11 23:39:52 EDT (Mon, 11 Jun 2007)
New Revision: 6985
URL: http://svn.boost.org/trac/boost/changeset/6985

Log:
hds_archetype and forward_hds_archetype added

Added:
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_archetypes/
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_archetypes/forward_hds_concept_archetype.hpp
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_archetypes/hds_concept_archetype.hpp

Added: sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_archetypes/forward_hds_concept_archetype.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_archetypes/forward_hds_concept_archetype.hpp 2007-06-11 23:39:52 EDT (Mon, 11 Jun 2007)
@@ -0,0 +1,61 @@
+/**
+ * @file forward_hds_concept_archetype.hpp
+ *
+ * @brief ForwardHDS concept archetype
+ *
+ * @par Definition
+ * This file provides an archetype class for compile time testing of the
+ * ForwardHDSConcept class.
+ *
+ * @par Archetype class
+ * \code
+ * class ForwardHDSConcept_archetype
+ * :HDSConcept_archetype {
+ * public:
+ * halfedge_descriptor& next_in_faccet(ForwardHDSConcept_archetype,
+ * halfedge_descriptor&) const{};
+ * halfedge_descriptor& next_at_source(ForwardHDSConcept_archetype,
+ * halfedge_descriptor&) const{};
+ * halfedge_descriptor& next_at_target(ForwardHDSConcept_archetype,
+ * halfedge_descriptor&) const{};
+ *
+ * };
+ * template<>
+ * class hds_traits<ForwardHDSConcept_archetype> {
+ * struct halfedge_descriptor
+ * :public boost::default_constructible_archetype,
+ * boost::copy_constructible_archetype,
+ * boost::equality_comparable_archetype,
+ * boost::assignable_archetype {};
+ *
+ * struct traversal_category
+ * :public boost::convertible_to_archetype<forward_traversal_tag>
+ * {};
+ * };
+ * \endcode
+ */
+#include <boost/concept_archetype.hpp>
+
+class ForwardHDSConcept_archetype
+ :HDSConcept_archetype {
+ public:
+ halfedge_descriptor& next_in_faccet(ForwardHDSConcept_archetype,
+ halfedge_descriptor&) const{};
+ halfedge_descriptor& next_at_source(ForwardHDSConcept_archetype,
+ halfedge_descriptor&) const{};
+ halfedge_descriptor& next_at_target(ForwardHDSConcept_archetype,
+ halfedge_descriptor&) const{};
+
+};
+template<>
+class hds_traits<ForwardHDSConcept_archetype> {
+ struct halfedge_descriptor
+ :public boost::default_constructible_archetype,
+ boost::copy_constructible_archetype,
+ boost::equality_comparable_archetype,
+ boost::assignable_archetype {};
+
+ struct traversal_category
+ :public boost::convertible_to_archetype<forward_traversal_tag>
+ {};
+};

Added: sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_archetypes/hds_concept_archetype.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_archetypes/hds_concept_archetype.hpp 2007-06-11 23:39:52 EDT (Mon, 11 Jun 2007)
@@ -0,0 +1,40 @@
+/**
+ * @file hds_concept_archetype.hpp
+ *
+ * @brief HDS concept archetype
+ *
+ * @par Definition
+ * This file provides an archetype class for compile time testing of the
+ * HDSConcept class.
+ *
+ * @par Archetype class
+ * \code
+ * class HDSConcept_archetype {
+ * public:
+ * halfedge_descriptor& opposite(halfedge_descriptor&) const{};
+ * };
+ * template<>
+ * class hds_traits<HDSConcept_archetype> {
+ * struct halfedge_descriptor
+ * :public boost::default_constructible_archetype,
+ * boost::copy_constructible_archetype,
+ * boost::equality_comparable_archetype,
+ * boost::assignable_archetype {};
+ * };
+ * \endcode
+ */
+#include <boost/concept_archetype.hpp>
+
+class HDSConcept_archetype {
+ public:
+ halfedge_descriptor& opposite(halfedge_descriptor&) const{};
+};
+
+template<>
+class hds_traits<HDSConcept_archetype> {
+ struct halfedge_descriptor
+ :public boost::default_constructible_archetype,
+ boost::copy_constructible_archetype,
+ boost::equality_comparable_archetype,
+ boost::assignable_archetype {};
+};


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