Update of /cvsroot/boost/boost/boost/bimap/detail
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1108/detail

Modified Files:
        bimap_core.hpp manage_bimap_key.hpp set_view_base.hpp 
Log Message:
tagged< set_of< X >, T > --> set_of< tagged< X,T > >

Index: bimap_core.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/bimap/detail/bimap_core.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- bimap_core.hpp      31 May 2007 07:01:34 -0000      1.4
+++ bimap_core.hpp      1 Jun 2007 03:31:00 -0000       1.5
@@ -38,7 +38,8 @@
 #include <boost/bimap/relation/mutant_relation.hpp>
 #include <boost/bimap/relation/member_at.hpp>
 #include <boost/bimap/relation/support/data_extractor.hpp>
-#include <boost/bimap/tags/support/apply_to_value_type.hpp>
+#include <boost/bimap/tags/support/default_tagged.hpp>
+#include <boost/bimap/tags/tagged.hpp>
 #include <boost/bimap/detail/manage_bimap_key.hpp>
 #include <boost/bimap/detail/manage_additional_parameters.hpp>
 #include <boost/bimap/detail/map_view_iterator.hpp>
@@ -76,43 +77,49 @@
 
 
 template< class LeftSetType, class RightSetType, class AP1, class AP2, class 
AP3 >
-struct bimap_core
+class bimap_core
 {
     // Manage bimap key instantiation
     // --------------------------------------------------------------------
-    private:
+    public:
 
     typedef BOOST_DEDUCED_TYPENAME manage_bimap_key
     <
-        LeftSetType,
-        ::boost::bimaps::relation::member_at::left
+        LeftSetType
 
-    >::type left_tagged_set_type;
+    >::type left_set_type;
 
     typedef BOOST_DEDUCED_TYPENAME manage_bimap_key
     <
-        RightSetType,
-        ::boost::bimaps::relation::member_at::right
-
-    >::type right_tagged_set_type;
+        RightSetType
+    
+       >::type right_set_type;
 
-    // Construct the relation type to be used
-    // --------------------------------------------------------------------
-    public:
+       
+       private:
 
-    //@{
+       typedef BOOST_DEDUCED_TYPENAME 
::boost::bimaps::tags::support::default_tagged
+       < 
+               BOOST_DEDUCED_TYPENAME left_set_type::user_type,
+               ::boost::bimaps::relation::member_at::left 
+       
+       >::type left_tagged_type;
 
-        typedef BOOST_DEDUCED_TYPENAME  left_tagged_set_type::value_type  
left_set_type;
-        typedef BOOST_DEDUCED_TYPENAME right_tagged_set_type::value_type 
right_set_type;
+       typedef BOOST_DEDUCED_TYPENAME 
::boost::bimaps::tags::support::default_tagged
+       < 
+               BOOST_DEDUCED_TYPENAME right_set_type::user_type,
+               ::boost::bimaps::relation::member_at::right
+       
+       >::type right_tagged_type;
 
-    //@}
+       public:
 
-    //@{
+       //@{
 
-        typedef BOOST_DEDUCED_TYPENAME  left_tagged_set_type::tag  left_tag;
-        typedef BOOST_DEDUCED_TYPENAME right_tagged_set_type::tag right_tag;
+               typedef BOOST_DEDUCED_TYPENAME  left_tagged_type::tag  left_tag;
+               typedef BOOST_DEDUCED_TYPENAME right_tagged_type::tag right_tag;
 
-    //@}
+       //@}
 
     //@{
 
@@ -128,22 +135,12 @@
 
     //@}
 
-
-    // Concept checks
-    // --------------------------------------------------------------------
-
-    //BOOST_CLASS_REQUIRE(  left_key_type, boost, AssignableConcept );
-    //BOOST_CLASS_REQUIRE( right_key_type, boost, AssignableConcept );
-
-
     // Manage the additional parameters
     // --------------------------------------------------------------------
     private:
 
     typedef BOOST_DEDUCED_TYPENAME 
manage_additional_parameters<AP1,AP2,AP3>::type parameters;
 
-
-
     /// \brief Relation type stored by the bimap.
     // --------------------------------------------------------------------
     public:
@@ -277,12 +274,12 @@
 
         is_same< BOOST_DEDUCED_TYPENAME parameters::set_type_of_relation, 
left_based >,
     // {
-            left_tagged_set_type,
+            ::boost::bimaps::tags::tagged< left_set_type, left_tag >,
     // }
     /* else */ BOOST_DEDUCED_TYPENAME mpl::if_<
             is_same< BOOST_DEDUCED_TYPENAME parameters::set_type_of_relation, 
right_based >,
     // {
-            right_tagged_set_type,
+                       ::boost::bimaps::tags::tagged< right_set_type, 
right_tag >,
     // }
     // else
     // {

Index: manage_bimap_key.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/bimap/detail/manage_bimap_key.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- manage_bimap_key.hpp        26 May 2007 17:23:15 -0000      1.2
+++ manage_bimap_key.hpp        1 Jun 2007 03:31:00 -0000       1.3
@@ -18,21 +18,13 @@
 
 #include <boost/config.hpp>
 
-// Boost.Bimap.Tags
-#include <boost/bimap/tags/support/default_tagged.hpp>
-#include <boost/bimap/tags/support/apply_to_value_type.hpp>
-
-// Boost.MPL
 #include <boost/mpl/eval_if.hpp>
-#include <boost/mpl/if.hpp>
 #include <boost/mpl/identity.hpp>
-#include <boost/mpl/placeholders.hpp>
 
 #include <boost/bimap/detail/is_set_type_of.hpp>
 
 #include <boost/bimap/set_of.hpp>
 
-
 namespace boost {
 namespace bimaps {
 namespace detail {
@@ -41,74 +33,45 @@
 \brief Metafunction to manage the set types of a bimap.
 
 \code
-template< class SetType, class DefaultTag >
+template< class Type >
 struct manage_bimap_key
 {
-    typedef {TaggedSetType} type;
+    typedef -SetType- type;
 }
 \endcode
 
-If KeyType is not tagged, DefaultTag is used. If KeyType is not a SetOfType
-specification it is converted to set_of< value_type_of<KeyType>::type > and the
-it is tagged with his tag or the default one.
-
 See also bimap, bimap_core.
                                                                                
 **/
 
 #ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
 
-template< class SetType, class DefaultTag >
+template< class Type >
 struct manage_bimap_key
 {
-    // First, convert the type to a tagged one with the default tag
-
-    typedef BOOST_DEDUCED_TYPENAME tags::support::default_tagged
-    <
-        SetType, DefaultTag
 
-    >::type tagged_type;
-
-    // Then manage plain key types, were the set type of the collection
-    // is not specified in the instantiation
-
-    typedef BOOST_DEDUCED_TYPENAME
+typedef BOOST_DEDUCED_TYPENAME
 
-       mpl::eval_if< BOOST_DEDUCED_TYPENAME is_set_type_of<
-                     BOOST_DEDUCED_TYPENAME tagged_type::value_type >::type,
+    mpl::eval_if< BOOST_DEDUCED_TYPENAME is_set_type_of< Type >::type,
     // {
-            // The type is
-            mpl::identity< tagged_type >,
+            mpl::identity< Type >,
     // }
     // else
     // {
             // Default it to a set
-            mpl::identity<
-                BOOST_DEDUCED_TYPENAME tags::support::apply_to_value_type
-                <
-                    set_of< mpl::_ >,
-                    tagged_type
-
-                >::type
-            >
+                       mpl::identity< set_of< Type > >
     // }
 
-    >::type tagged_set_type;
-
-    // Returns tagged_set_type and evaluate the concept_checked_type
-
-    typedef BOOST_DEDUCED_TYPENAME mpl::if_c<true,
-
-        tagged_set_type,
+    >::type set_type;
 
-        BOOST_DEDUCED_TYPENAME
-        tagged_set_type::value_type::lazy_concept_checked::type
+    // Returns set_type and evaluate the concept_checked_type
 
+    typedef BOOST_DEDUCED_TYPENAME mpl::if_c< true, set_type, 
+               BOOST_DEDUCED_TYPENAME set_type::lazy_concept_checked::type
     >::type type;
 };
 
 
 
-
 #endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
 
 } // namespace detail

Index: set_view_base.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/bimap/detail/set_view_base.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- set_view_base.hpp   31 May 2007 07:01:34 -0000      1.3
+++ set_view_base.hpp   1 Jun 2007 03:31:00 -0000       1.4
@@ -42,31 +42,16 @@
     KeyToBase keyToBase;
 };
 
-template< class TA, class TB, class Info, class KeyToBase >
-class set_view_key_to_base<
-    BOOST_DEDUCED_TYPENAME ::boost::bimaps::relation::
-        mutant_relation<TA,TB,Info,true>::base_storage,
-    BOOST_DEDUCED_TYPENAME ::boost::bimaps::relation::
-        mutant_relation<TA,TB,Info,true>::base_storage,
-    KeyToBase
->
+template< class MutantRelationStorage, class KeyToBase >
+class 
set_view_key_to_base<MutantRelationStorage,MutantRelationStorage,KeyToBase>
 {
+       typedef BOOST_DEDUCED_TYPENAME 
MutantRelationStorage::non_mutable_storage non_mutable_storage;
     public:
-    const BOOST_DEDUCED_TYPENAME ::boost::bimaps::relation::
-        mutant_relation<TA,TB,Info,true>::base_storage &
-            operator()( const BOOST_DEDUCED_TYPENAME 
::boost::bimaps::relation::
-                            mutant_relation<TA,TB,Info,false>::base_storage & 
k ) const
+    const MutantRelationStorage & operator()( const non_mutable_storage & k ) 
const
     {
-        return ::boost::bimaps::relation::detail::mutate<
-            BOOST_DEDUCED_TYPENAME ::boost::bimaps::relation::
-                mutant_relation<TA,TB,Info,true>::base_storage
-        >(k);
+        return 
::boost::bimaps::relation::detail::mutate<MutantRelationStorage>(k);
     }
-
-    const BOOST_DEDUCED_TYPENAME ::boost::bimaps::relation::
-        mutant_relation<TA,TB,Info,true>::base_storage &
-            operator()( const BOOST_DEDUCED_TYPENAME 
::boost::bimaps::relation::
-                            mutant_relation<TA,TB,Info,true>::base_storage & k 
) const
+    const MutantRelationStorage & operator()( const MutantRelationStorage & k 
) const
     {
         return k;
     }


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to