Boost logo

Boost-Commit :

From: huseyinakcan_at_[hidden]
Date: 2007-06-25 19:16:32


Author: huseyinakcan
Date: 2007-06-25 19:16:30 EDT (Mon, 25 Jun 2007)
New Revision: 7150
URL: http://svn.boost.org/trac/boost/changeset/7150

Log:
modifying the test driver and solving compiler problems.

Text files modified:
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/hds_concept.cpp | 6 ++++
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/hds_concept.hpp | 11 +++++----
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/hds_concept.t.cpp | 41 ++++++++++++++++++++++++++-------------
   3 files changed, 38 insertions(+), 20 deletions(-)

Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/hds_concept.cpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/hds_concept.cpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/hds_concept.cpp 2007-06-25 19:16:30 EDT (Mon, 25 Jun 2007)
@@ -1,4 +1,8 @@
 // hds_concept.cpp -*- C++ -*-
 
-#include <boost/hdstl/concepts/hds_concept.hpp>
+//#include <boost/hdstl/concepts/hds_concept.hpp>
+#include "hds_concept.hpp"
+
+int main()
+{}
 

Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/hds_concept.hpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/hds_concept.hpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/hds_concept.hpp 2007-06-25 19:16:30 EDT (Mon, 25 Jun 2007)
@@ -103,10 +103,11 @@
 #ifndef BOOST_HDSTL_CONCEPTS_HDS_CONCEPT_HPP
 #define BOOST_HDSTL_CONCEPTS_HDS_CONCEPT_HPP 1
 
-#include <boost/concepts.h>
+#include <boost/concept_check.hpp>
+#include "../hds_traits.hpp"
 
+namespace boost {
 namespace hdstl {
-namespace concepts {
 
     template <class HDS>
     struct HDSConcept {
@@ -138,12 +139,12 @@
             function_requires<CopyConstructibleConcept<halfedge_descriptor> >();
             function_requires<EqualityComparableConcept<halfedge_descriptor> >();
             function_requires<AssignableConcept<halfedge_descriptor> >();
-
+ h= hds.opposite(h);
             const_constraints(hds);
         }
 
         // ACCESSORS
- void const_constraints(HDS const& hds)
+ void const_constraints(const HDS& hds)
             // Check that the non-modifiable 'HDS' template parameters
             // satisfies all the constraints of 'HDSConcept'.
         {
@@ -156,7 +157,7 @@
             halfedge_descriptor h; // a halfedge descriptor
     };
 
-} // close namespace concepts
 } // close namespace hdstl
+} // close namespace boost
 
 #endif

Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/hds_concept.t.cpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/hds_concept.t.cpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/hds_concept.t.cpp 2007-06-25 19:16:30 EDT (Mon, 25 Jun 2007)
@@ -1,9 +1,12 @@
 //hds_concept.t.cpp -*- C++ -*-
 
-#include <boost/hdstl/hds_concepts/hds_concept.hpp>
+//#include <boost/hdstl/hds_concepts/hds_concept.hpp>
+#include "hds_concept.hpp"
 
+//#include <boost/test/unit_test.hpp>
+//#include <boost/test/included/unit_test_framework.hpp>
 #include <boost/test/minimal.hpp>
-#include <boost/concept.hpp>
+#include <boost/concept_check.hpp>
 
 //@OVERVIEW: The component under test is a concept-checking class. We
 // proceed with the standard test plan for such a class.
@@ -16,45 +19,52 @@
 // halfedge_descriptor as an int, although a real archetype would make
 // this into a custom-made class with the tailored minimal requirements.
 
+namespace boost {
+namespace hdstl {
 struct hds_archetype1 {
     typedef int halfedge_descriptor;
     halfedge_descriptor opposite(halfedge_descriptor h) const { return h; }
 };
 
+
+template<typename T>
+int opposite(const T& hds, int h) { return h; }
+
 struct hds_archetype2 {
     typedef int halfedge_descriptor;
+ halfedge_descriptor opposite(halfedge_descriptor h) const
+ {
+ return boost::hdstl::opposite(*this, h);
+ }
 };
-int opposite(const hds_archetype2& hds, int h) { return h; }
 
-namespace boost {
-namespace hdstl {
     template <>
     class hds_traits<hds_archetype1>
     {
+ public:
         typedef int halfedge_descriptor;
- const bool supports_vertices = false;
- const bool supports_facets = false;
+ static const bool supports_vertices = false;
+ static const bool supports_facets = false;
     };
     template <>
- class hds_traits<hds_archetype1>
+ class hds_traits<hds_archetype2>
     {
+ public:
         typedef int halfedge_descriptor;
- enum { supports_vertices = true };
- enum { supports_facets = true };
+ enum { supports_vertices = true };
+ enum { supports_facets = true };
     };
-}
-}
 
 template <class HDS>
 struct class_concept_requirements
 {
- BOOST_CLASS_REQUIRE(HDS, boost::hdstl::concepts, HDSConcept);
+ BOOST_CLASS_REQUIRE(HDS, boost::hdstl, HDSConcept);
 };
 
 template <class HDS>
 bool concept_requirements()
 {
- function_requires<boost::hdstl::concepts::HDSConcept<HDS> >();
+ function_requires<HDSConcept<HDS> >();
    class_concept_requirements<HDS>(); // force instantiation
 }
 
@@ -64,3 +74,6 @@
     BOOST_CHECK(( concept_requirements<hds_archetype2>() ));
     return 0;
 }
+
+} // 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