assoc_cntnr.hpp

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // Copyright (C) 2005 Free Software Foundation, Inc.
00004 //
00005 // This file is part of the GNU ISO C++ Library.  This library is free
00006 // software; you can redistribute it and/or modify it under the
00007 // terms of the GNU General Public License as published by the
00008 // Free Software Foundation; either version 2, or (at your option)
00009 // any later version.
00010 
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // GNU General Public License for more details.
00015 
00016 // You should have received a copy of the GNU General Public License along
00017 // with this library; see the file COPYING.  If not, write to the Free
00018 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
00019 // USA.
00020 
00021 // As a special exception, you may use this file as part of a free software
00022 // library without restriction.  Specifically, if other files instantiate
00023 // templates or use macros or inline functions from this file, or you compile
00024 // this file and link it with other files to produce an executable, this
00025 // file does not by itself cause the resulting executable to be covered by
00026 // the GNU General Public License.  This exception does not however
00027 // invalidate any other reasons why the executable file might be covered by
00028 // the GNU General Public License.
00029 
00030 // Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
00031 
00032 // Permission to use, copy, modify, sell, and distribute this software
00033 // is hereby granted without fee, provided that the above copyright
00034 // notice appears in all copies, and that both that copyright notice and
00035 // this permission notice appear in supporting documentation. None of
00036 // the above authors, nor IBM Haifa Research Laboratories, make any
00037 // representation about the suitability of this software for any
00038 // purpose. It is provided "as is" without express or implied warranty.
00039 
00045 #ifndef ASSOC_CNTNR_HPP
00046 #define ASSOC_CNTNR_HPP
00047 
00048 #include <ext/pb_assoc/ms_trait.hpp>
00049 #include <ext/pb_assoc/ds_trait.hpp>
00050 #include <ext/pb_assoc/detail/type_utils.hpp>
00051 #include <ext/pb_assoc/detail/typelist.hpp>
00052 #include <ext/pb_assoc/detail/standard_policies.hpp>
00053 #include <ext/pb_assoc/detail/mapping_level_imp.hpp>
00054 #include <ext/pb_assoc/detail/assoc_cntnr_base.hpp>
00055 #include <ext/pb_assoc/detail/value_type_adapter/value_type_adapter.hpp>
00056 
00057 namespace pb_assoc
00058 {
00059 
00060 #define PB_ASSOC_CLASS_T_DEC \
00061     template< \
00062         typename Key, \
00063         typename Data, \
00064         class DS_Tag, \
00065         class Policy_Tl, \
00066         class Allocator>
00067 
00068 #define PB_ASSOC_CLASS_C_DEC \
00069     basic_assoc_cntnr< \
00070         Key, \
00071         Data, \
00072         DS_Tag, \
00073         Policy_Tl, \
00074         Allocator>
00075 
00076 #define PB_ASSOC_BASE_C_DEC \
00077     detail::assoc_cntnr_base< \
00078         Key, \
00079         Data, \
00080         DS_Tag, \
00081         Policy_Tl, \
00082         Allocator>::type
00083 
00084 #define PB_ASSOC_DIRECT_BASE_C_DEC \
00085     detail::assoc_cntnr_base< \
00086         Key, \
00087         Data, \
00088         DS_Tag, \
00089         Policy_Tl, \
00090         Allocator>::type
00091 
00092   template<typename Key,
00093        typename Data,
00094        class DS_Tag,
00095        class Policy_Tl,
00096        class Allocator>
00097   class basic_assoc_cntnr 
00098   : public detail::assoc_cntnr_base<Key, Data, DS_Tag, Policy_Tl, Allocator>::type
00099   {
00100   public:
00101     typedef typename Allocator::size_type size_type;
00102     typedef typename Allocator::difference_type difference_type;
00103     typedef DS_Tag ds_category;
00104     typedef data_enabled_ms_tag ms_category;
00105     typedef Allocator allocator;
00106 
00107     typedef
00108     typename allocator::template rebind<
00109       Key>::other::value_type
00110     key_type;
00111 
00112     typedef
00113     typename allocator::template rebind<
00114       Key>::other::reference
00115     key_reference;
00116 
00117     typedef
00118     typename allocator::template rebind<
00119       Key>::other::const_reference
00120     const_key_reference;
00121 
00122     typedef
00123     typename allocator::template rebind<
00124       Key>::other::pointer
00125     key_pointer;
00126 
00127     typedef
00128     typename allocator::template rebind<
00129       Key>::other::const_pointer
00130     const_key_pointer;
00131 
00132     typedef
00133     typename allocator::template rebind<
00134       Data>::other::value_type
00135     data_type;
00136 
00137     typedef
00138     typename allocator::template rebind<
00139       Data>::other::reference
00140     data_reference;
00141 
00142     typedef
00143     typename allocator::template rebind<
00144       Data>::other::const_reference
00145     const_data_reference;
00146 
00147     typedef
00148     typename allocator::template rebind<
00149       Data>::other::pointer
00150     data_pointer;
00151 
00152     typedef
00153     typename allocator::template rebind<
00154       Data>::other::const_pointer
00155     const_data_pointer;
00156 
00157     typedef
00158     typename allocator::template rebind<
00159       std::pair<const key_type, data_type> >::other::value_type
00160     value_type;
00161 
00162     typedef
00163     typename allocator::template rebind<
00164       std::pair<const key_type, data_type> >::other::reference
00165     reference;
00166 
00167     typedef
00168     typename allocator::template rebind<
00169       std::pair<const key_type, data_type> >::other::const_reference
00170     const_reference;
00171 
00172     typedef
00173     typename allocator::template rebind<
00174       std::pair<const key_type, data_type> >::other::pointer
00175     pointer;
00176 
00177     typedef
00178     typename allocator::template rebind<
00179       std::pair<const key_type, data_type> >::other::const_pointer
00180     const_pointer;
00181 
00182     typedef
00183     typename PB_ASSOC_BASE_C_DEC::const_find_iterator
00184     const_find_iterator;
00185 
00186     typedef typename PB_ASSOC_BASE_C_DEC::find_iterator find_iterator;
00187 
00188     typedef typename PB_ASSOC_BASE_C_DEC::const_iterator const_iterator;
00189 
00190     typedef typename PB_ASSOC_BASE_C_DEC::iterator iterator;
00191 
00192   public:
00193 
00194     virtual
00195     ~basic_assoc_cntnr();
00196 
00197     inline size_type
00198     size() const;
00199 
00200     inline size_type
00201     max_size() const;
00202 
00203     inline bool
00204     empty() const;
00205 
00206     inline static const_key_reference
00207     extract_key(const_reference r_val);
00208 
00209     inline std::pair<find_iterator, bool>
00210     insert(const_reference r_val);
00211 
00212     inline data_reference
00213     operator[](const_key_reference r_key);
00214 
00215     inline find_iterator
00216     find(const_key_reference r_key)
00217     {
00218       return (my_base::find(r_key));
00219     }
00220 
00221     inline const_find_iterator
00222     find(const_key_reference r_key) const
00223     {
00224       return (my_base::find(r_key));
00225     }
00226 
00227     inline const_data_reference
00228     operator[](const_key_reference r_key) const;
00229 
00230     inline size_type
00231     erase(const_key_reference r_key);
00232 
00233     template<class Pred>
00234     inline size_type
00235     erase_if(Pred prd);
00236 
00237     void
00238     clear();
00239 
00240     inline iterator
00241     begin();
00242 
00243     inline const_iterator
00244     begin() const;
00245 
00246     inline iterator
00247     end();
00248 
00249     inline const_iterator
00250     end() const;
00251 
00252   protected:
00253 
00254 #define PB_ASSOC_CLASS_NAME basic_assoc_cntnr
00255 
00256 #define PB_ASSOC_DIRECT_BASE_CAST_C_DEC \
00257     typename PB_ASSOC_DIRECT_BASE_C_DEC
00258 
00259 #include <ext/pb_assoc/detail/constructors_destructor_fn_imps.hpp>
00260 
00261 #undef PB_ASSOC_DIRECT_BASE_CAST_C_DEC
00262 
00263 #undef PB_ASSOC_CLASS_NAME
00264 
00265   private:
00266     typedef typename PB_ASSOC_BASE_C_DEC my_base;
00267 
00268   private:
00269     basic_assoc_cntnr& 
00270     operator=(const PB_ASSOC_CLASS_C_DEC& r_other);
00271   };
00272 
00273 #include <ext/pb_assoc/detail/basic_assoc_cntnr/constructors_destructor_fn_imps.hpp>
00274 #include <ext/pb_assoc/detail/basic_assoc_cntnr/iterators_fn_imps.hpp>
00275 #include <ext/pb_assoc/detail/basic_assoc_cntnr/info_fn_imps.hpp>
00276 #include <ext/pb_assoc/detail/basic_assoc_cntnr/erase_fn_imps.hpp>
00277 #include <ext/pb_assoc/detail/basic_assoc_cntnr/insert_fn_imps.hpp>
00278 #include <ext/pb_assoc/detail/basic_assoc_cntnr/d_insert_fn_imps.hpp>
00279 #include <ext/pb_assoc/detail/basic_assoc_cntnr/d_find_fn_imps.hpp>
00280 #include <ext/pb_assoc/detail/basic_assoc_cntnr/d_extract_key.hpp>
00281 
00282 #undef PB_ASSOC_CLASS_T_DEC
00283 
00284 #undef PB_ASSOC_CLASS_C_DEC
00285 
00286 #undef PB_ASSOC_BASE_C_DEC
00287 
00288 #undef PB_ASSOC_DIRECT_BASE_C_DEC
00289 
00290 #define PB_ASSOC_CLASS_T_DEC \
00291     template< \
00292         typename Key, \
00293         class Cntnr, \
00294         class DS_Tag, \
00295         class Policy_Tl, \
00296         class Allocator>
00297 
00298 #define PB_ASSOC_CLASS_C_DEC \
00299     basic_assoc_cntnr< \
00300         Key, \
00301         compound_data_type< \
00302             Cntnr>, \
00303         DS_Tag, \
00304         Policy_Tl, \
00305         Allocator>
00306 
00307 #define PB_ASSOC_DIRECT_BASE_C_DEC \
00308     detail::value_type_adapter< \
00309         Key, \
00310         compound_data_type< \
00311             Cntnr>, \
00312         DS_Tag, \
00313         Policy_Tl, \
00314         Allocator, \
00315         detail::mapping_level_imp< \
00316             compound_data_type< \
00317                 Cntnr> >::value - 1>
00318 
00319 #define PB_ASSOC_BASE_C_DEC \
00320     detail::assoc_cntnr_base< \
00321         Key, \
00322         compound_data_type< \
00323             Cntnr>, \
00324         DS_Tag, \
00325         Policy_Tl, \
00326         Allocator>::type
00327 
00328   template<typename Key,
00329        class Cntnr,
00330        class DS_Tag,
00331        class Policy_Tl,
00332        class Allocator>
00333   class basic_assoc_cntnr<Key, compound_data_type< Cntnr>, DS_Tag, Policy_Tl, Allocator> : public PB_ASSOC_DIRECT_BASE_C_DEC
00334   {
00335   public:
00336     typedef typename Allocator::size_type size_type;
00337     typedef typename Allocator::difference_type difference_type;
00338     typedef DS_Tag ds_category;
00339     typedef compound_data_enabled_ms_tag ms_category;
00340     typedef Allocator allocator;
00341 
00342     typedef
00343     typename allocator::template rebind<
00344       Key>::other::value_type
00345     key_type;
00346 
00347     typedef
00348     typename allocator::template rebind<
00349       Key>::other::reference
00350     key_reference;
00351 
00352     typedef
00353     typename allocator::template rebind<
00354       Key>::other::const_reference
00355     const_key_reference;
00356 
00357     typedef
00358     typename allocator::template rebind<
00359       Key>::other::pointer
00360     key_pointer;
00361 
00362     typedef
00363     typename allocator::template rebind<
00364       Key>::other::const_pointer
00365     const_key_pointer;
00366 
00367     typedef
00368     typename allocator::template rebind<
00369       Cntnr>::other::value_type
00370     data_type;
00371 
00372     typedef
00373     typename allocator::template rebind<
00374       Cntnr>::other::reference
00375     data_reference;
00376 
00377     typedef
00378     typename allocator::template rebind<
00379       Cntnr>::other::const_reference
00380     const_data_reference;
00381 
00382     typedef
00383     typename allocator::template rebind<
00384       Cntnr>::other::pointer
00385     data_pointer;
00386 
00387     typedef
00388     typename allocator::template rebind<
00389       Cntnr>::other::const_pointer
00390     const_data_pointer;
00391 
00392     typedef
00393     typename allocator::template rebind<
00394       std::pair<const key_type, Cntnr> >::other::value_type
00395     value_type;
00396 
00397     typedef
00398     typename allocator::template rebind<
00399       std::pair<const key_type, Cntnr> >::other::reference
00400     reference;
00401 
00402     typedef
00403     typename allocator::template rebind<
00404       std::pair<const key_type, Cntnr> >::other::const_reference
00405     const_reference;
00406 
00407     typedef
00408     typename allocator::template rebind<
00409       std::pair<const key_type, Cntnr> >::other::pointer
00410     pointer;
00411 
00412     typedef
00413     typename allocator::template rebind<
00414       std::pair<const key_type, Cntnr> >::other::const_pointer
00415     const_pointer;
00416 
00417     typedef
00418     typename PB_ASSOC_BASE_C_DEC::const_find_iterator
00419     const_find_iterator;
00420 
00421     typedef typename PB_ASSOC_BASE_C_DEC::find_iterator find_iterator;
00422 
00423     typedef typename PB_ASSOC_BASE_C_DEC::const_iterator const_iterator;
00424 
00425     typedef typename PB_ASSOC_BASE_C_DEC::iterator iterator;
00426 
00427     template<int Mapping_Level>
00428     struct rebind
00429     {
00430     private:
00431       enum
00432     {
00433       mapping_level =
00434       detail::mapping_level_imp<compound_data_type<Cntnr> >::value
00435     };
00436 
00437     public:
00438       typedef
00439       detail::value_type_adapter<
00440     Key,
00441     compound_data_type<
00442     Cntnr>,
00443     DS_Tag,
00444     Policy_Tl,
00445     Allocator,
00446     mapping_level - Mapping_Level>
00447       other;
00448     };
00449 
00450   public:
00451 
00452     virtual
00453     ~basic_assoc_cntnr();
00454 
00455     inline size_type
00456     size() const;
00457 
00458     inline size_type
00459     max_size() const;
00460 
00461     inline bool
00462     empty() const;
00463 
00464     inline static const_key_reference
00465     extract_key(const_reference r_val);
00466 
00467     inline std::pair<find_iterator, bool>
00468     insert(const_reference r_val);
00469 
00470     inline data_reference
00471     operator[](const_key_reference r_key);
00472 
00473     inline find_iterator
00474     find(const_key_reference r_key)
00475     {
00476       return (my_base::find(r_key));
00477     }
00478 
00479     inline const_find_iterator
00480     find(const_key_reference r_key) const
00481     {
00482       return (my_base::find(r_key));
00483     }
00484 
00485     inline const_data_reference
00486     operator[](const_key_reference r_key) const;
00487 
00488     inline size_type
00489     erase(const_key_reference r_key);
00490 
00491     template<class Pred>
00492     inline size_type
00493     erase_if(Pred prd);
00494 
00495     void
00496     clear();
00497 
00498     inline iterator
00499     begin();
00500 
00501     inline const_iterator
00502     begin() const;
00503 
00504     inline iterator
00505     end();
00506 
00507     inline const_iterator
00508     end() const;
00509 
00510   protected:
00511 
00512 #define PB_ASSOC_CLASS_NAME basic_assoc_cntnr
00513 
00514 #define PB_ASSOC_DIRECT_BASE_CAST_C_DEC \
00515     typename PB_ASSOC_DIRECT_BASE_C_DEC
00516 
00517 #include <ext/pb_assoc/detail/constructors_destructor_fn_imps.hpp>
00518 
00519 #undef PB_ASSOC_DIRECT_BASE_CAST_C_DEC
00520 
00521 #undef PB_ASSOC_CLASS_NAME
00522 
00523   private:
00524     typedef typename PB_ASSOC_BASE_C_DEC my_base;
00525 
00526   private:
00527     basic_assoc_cntnr& 
00528     operator=(const PB_ASSOC_CLASS_C_DEC& r_other);
00529   };
00530 
00531 #include <ext/pb_assoc/detail/basic_assoc_cntnr/constructors_destructor_fn_imps.hpp>
00532 #include <ext/pb_assoc/detail/basic_assoc_cntnr/iterators_fn_imps.hpp>
00533 #include <ext/pb_assoc/detail/basic_assoc_cntnr/info_fn_imps.hpp>
00534 #include <ext/pb_assoc/detail/basic_assoc_cntnr/erase_fn_imps.hpp>
00535 #include <ext/pb_assoc/detail/basic_assoc_cntnr/insert_fn_imps.hpp>
00536 #include <ext/pb_assoc/detail/basic_assoc_cntnr/d_insert_fn_imps.hpp>
00537 #include <ext/pb_assoc/detail/basic_assoc_cntnr/d_find_fn_imps.hpp>
00538 #include <ext/pb_assoc/detail/basic_assoc_cntnr/d_extract_key.hpp>
00539 
00540 #undef PB_ASSOC_CLASS_T_DEC
00541 
00542 #undef PB_ASSOC_CLASS_C_DEC
00543 
00544 #undef PB_ASSOC_BASE_C_DEC
00545 
00546 #undef PB_ASSOC_DIRECT_BASE_C_DEC
00547 
00548 #define PB_ASSOC_CLASS_T_DEC \
00549     template<typename Key, class DS_Tag, class Policy_Tl, class Allocator>
00550 
00551 #define PB_ASSOC_CLASS_C_DEC \
00552     basic_assoc_cntnr< \
00553         Key, \
00554         null_data_type, \
00555         DS_Tag, \
00556         Policy_Tl, \
00557         Allocator>
00558 
00559 #define PB_ASSOC_BASE_C_DEC \
00560     detail::assoc_cntnr_base< \
00561         Key, \
00562         null_data_type, \
00563         DS_Tag, \
00564         Policy_Tl, \
00565         Allocator>::type
00566 
00567   template<typename Key, class DS_Tag, class Policy_Tl, class Allocator>
00568   class basic_assoc_cntnr<Key, null_data_type, DS_Tag, Policy_Tl, Allocator> : public PB_ASSOC_BASE_C_DEC
00569   {
00570   public:
00571     typedef typename Allocator::size_type size_type;
00572     typedef typename Allocator::difference_type difference_type;
00573     typedef DS_Tag ds_category;
00574     typedef basic_ms_tag ms_category;
00575     typedef Allocator allocator;
00576 
00577     typedef
00578     typename allocator::template rebind<
00579       Key>::other::value_type
00580     key_type;
00581 
00582     typedef
00583     typename allocator::template rebind<
00584       Key>::other::reference
00585     key_reference;
00586 
00587     typedef
00588     typename allocator::template rebind<
00589       Key>::other::const_reference
00590     const_key_reference;
00591 
00592     typedef
00593     typename allocator::template rebind<
00594       Key>::other::pointer
00595     key_pointer;
00596 
00597     typedef
00598     typename allocator::template rebind<
00599       Key>::other::const_pointer
00600     const_key_pointer;
00601 
00602     typedef
00603     typename allocator::template rebind<
00604       key_type>::other::value_type
00605     value_type;
00606 
00607     typedef
00608     typename allocator::template rebind<
00609       key_type>::other::const_reference
00610     reference;
00611 
00612     typedef
00613     typename allocator::template rebind<
00614       key_type>::other::const_reference
00615     const_reference;
00616 
00617     typedef
00618     typename allocator::template rebind<
00619       key_type>::other::const_pointer
00620     pointer;
00621 
00622     typedef
00623     typename allocator::template rebind<key_type>::other::const_pointer
00624     const_pointer;
00625 
00626     typedef
00627     typename PB_ASSOC_BASE_C_DEC::const_find_iterator
00628     const_find_iterator;
00629 
00630     typedef typename PB_ASSOC_BASE_C_DEC::find_iterator find_iterator;
00631 
00632     typedef typename PB_ASSOC_BASE_C_DEC::const_iterator const_iterator;
00633 
00634     typedef typename PB_ASSOC_BASE_C_DEC::iterator iterator;
00635 
00636   public:
00637 
00638     virtual
00639     ~basic_assoc_cntnr();
00640 
00641     inline size_type
00642     size() const;
00643 
00644     inline size_type
00645     max_size() const;
00646 
00647     inline bool
00648     empty() const;
00649 
00650     inline static const_key_reference
00651     extract_key(const_reference r_val);
00652 
00653     inline std::pair<find_iterator, bool>
00654     insert(const_reference r_val);
00655 
00656     inline find_iterator
00657     find(const_key_reference r_key)
00658     { return (my_base::find(r_key)); }
00659 
00660     inline const_find_iterator
00661     find(const_key_reference r_key) const
00662     { return (my_base::find(r_key)); }
00663 
00664     inline size_type
00665     erase(const_key_reference r_key);
00666 
00667     template<class Pred>
00668     inline size_type
00669     erase_if(Pred prd);
00670 
00671     void
00672     clear();
00673 
00674     inline iterator
00675     begin();
00676 
00677     inline const_iterator
00678     begin() const;
00679 
00680     inline iterator
00681     end();
00682 
00683     inline const_iterator
00684     end() const;
00685 
00686   protected:
00687 
00688 #define PB_ASSOC_CLASS_NAME basic_assoc_cntnr
00689 
00690 #define PB_ASSOC_DIRECT_BASE_C_DEC PB_ASSOC_BASE_C_DEC
00691 
00692 #define PB_ASSOC_DIRECT_BASE_CAST_C_DEC \
00693     typename PB_ASSOC_DIRECT_BASE_C_DEC
00694 
00695 #include <ext/pb_assoc/detail/constructors_destructor_fn_imps.hpp>
00696 
00697 #undef PB_ASSOC_DIRECT_BASE_CAST_C_DEC
00698 
00699 #undef PB_ASSOC_DIRECT_BASE_C_DEC
00700 
00701 #undef PB_ASSOC_CLASS_NAME
00702 
00703   private:
00704     typedef typename PB_ASSOC_BASE_C_DEC my_base;
00705 
00706   private:
00707     basic_assoc_cntnr& 
00708     operator=(const PB_ASSOC_CLASS_C_DEC& r_other);
00709   };
00710 
00711 #include <ext/pb_assoc/detail/basic_assoc_cntnr/constructors_destructor_fn_imps.hpp>
00712 #include <ext/pb_assoc/detail/basic_assoc_cntnr/iterators_fn_imps.hpp>
00713 #include <ext/pb_assoc/detail/basic_assoc_cntnr/info_fn_imps.hpp>
00714 #include <ext/pb_assoc/detail/basic_assoc_cntnr/erase_fn_imps.hpp>
00715 #include <ext/pb_assoc/detail/basic_assoc_cntnr/insert_fn_imps.hpp>
00716 #include <ext/pb_assoc/detail/basic_assoc_cntnr/extract_key.hpp>
00717 
00718 #undef PB_ASSOC_CLASS_T_DEC
00719 
00720 #undef PB_ASSOC_CLASS_C_DEC
00721 
00722 #undef PB_ASSOC_BASE_C_DEC
00723 
00724 #define PB_ASSOC_TYPELIST_CHAIN1(X0) pb_assoc::detail::typelist_chain<X0, pb_assoc::detail::null_type>
00725 #define PB_ASSOC_TYPELIST_CHAIN2(X0, X1) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN1(X1) >
00726 #define PB_ASSOC_TYPELIST_CHAIN3(X0, X1, X2) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN2(X1, X2) >
00727 #define PB_ASSOC_TYPELIST_CHAIN4(X0, X1, X2, X3) pb_assoc::detail::typelist_chain<X0,  PB_ASSOC_TYPELIST_CHAIN3(X1, X2, X3) >
00728 #define PB_ASSOC_TYPELIST_CHAIN5(X0, X1, X2, X3, X4) pb_assoc::detail::typelist_chain<X0,  PB_ASSOC_TYPELIST_CHAIN4(X1, X2, X3, X4) >
00729 #define PB_ASSOC_TYPELIST_CHAIN6(X0, X1, X2, X3, X4, X5) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN5(X1, X2, X3, X4, X5) >
00730 #define PB_ASSOC_TYPELIST_CHAIN7(X0, X1, X2, X3, X4, X5, X6) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN6(X1, X2, X3, X4, X5, X6) >
00731 #define PB_ASSOC_TYPELIST_CHAIN8(X0, X1, X2, X3, X4, X5, X6, X7) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN7(X1, X2, X3, X4, X5, X6, X7) >
00732 #define PB_ASSOC_TYPELIST_CHAIN9(X0, X1, X2, X3, X4, X5, X6, X7, X8) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN8(X1, X2, X3, X4, X5, X6, X7, X8) >
00733 #define PB_ASSOC_TYPELIST_CHAIN10(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN9(X1, X2, X3, X4, X5, X6, X7, X8, X9) >
00734 #define PB_ASSOC_TYPELIST_CHAIN11(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN10(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10) >
00735 #define PB_ASSOC_TYPELIST_CHAIN12(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN11(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11) >
00736 #define PB_ASSOC_TYPELIST_CHAIN13(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN12(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12) >
00737 #define PB_ASSOC_TYPELIST_CHAIN14(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN13(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13) >
00738 #define PB_ASSOC_TYPELIST_CHAIN15(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14) pb_assoc::detail::typelist_chain<X0, PB_ASSOC_TYPELIST_CHAIN14(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14) >
00739 
00740 #define PB_ASSOC_CLASS_T_DEC \
00741     template< \
00742         typename Key, \
00743         typename Data, \
00744         class Hash_Fn, \
00745         class Eq_Fn, \
00746         class Resize_Policy, \
00747         bool Store_Hash, \
00748         class DS_Tag, \
00749         class Policy_TL, \
00750         class Allocator>
00751 
00752 #define PB_ASSOC_CLASS_C_DEC \
00753     basic_hash_assoc_cntnr< \
00754         Key, \
00755         Data, \
00756         Hash_Fn, \
00757         Eq_Fn, \
00758         Resize_Policy, \
00759         Store_Hash, \
00760         DS_Tag, \
00761         Policy_TL, \
00762         Allocator>
00763 
00764 #define PB_ASSOC_BASE_C_DEC \
00765     basic_assoc_cntnr< \
00766         Key, \
00767         Data, \
00768         DS_Tag, \
00769         typename pb_assoc::detail::typelist_append< \
00770             pb_assoc::detail::typelist< \
00771                 PB_ASSOC_TYPELIST_CHAIN4( Hash_Fn, Eq_Fn, Resize_Policy, pb_assoc::detail::int_to_type<Store_Hash>) >, \
00772                 Policy_TL>::type, \
00773         Allocator>
00774 
00775   template<typename Key,
00776        typename Data,
00777        class Hash_Fn,
00778        class Eq_Fn,
00779        class Resize_Policy,
00780        bool Store_Hash,
00781        class DS_Tag,
00782        class Policy_TL,
00783        class Allocator>
00784   class basic_hash_assoc_cntnr : public PB_ASSOC_BASE_C_DEC
00785   {
00786   public:
00787     typedef Hash_Fn hash_fn;
00788 
00789     typedef Eq_Fn eq_fn;
00790 
00791     typedef Resize_Policy resize_policy;
00792 
00793     enum
00794       {
00795     store_hash = Store_Hash
00796       };
00797 
00798     virtual
00799     ~basic_hash_assoc_cntnr();
00800 
00801     hash_fn& 
00802     get_hash_fn();
00803 
00804     const hash_fn& 
00805     get_hash_fn() const;
00806 
00807     eq_fn& 
00808     get_eq_fn();
00809 
00810     const eq_fn& 
00811     get_eq_fn() const;
00812 
00813     Resize_Policy& 
00814     get_resize_policy();
00815 
00816     const resize_policy& 
00817     get_resize_policy() const;
00818 
00819   protected:
00820 
00821     typedef typename Allocator::size_type size_type;
00822 
00823     virtual void
00824     do_resize(size_type new_size);
00825 
00826 #define PB_ASSOC_CLASS_NAME basic_hash_assoc_cntnr
00827 
00828 #define PB_ASSOC_DIRECT_BASE_C_DEC PB_ASSOC_BASE_C_DEC
00829 
00830 #define PB_ASSOC_DIRECT_BASE_CAST_C_DEC \
00831     PB_ASSOC_DIRECT_BASE_C_DEC
00832 
00833 #include <ext/pb_assoc/detail/constructors_destructor_fn_imps.hpp>
00834 
00835 #undef PB_ASSOC_DIRECT_BASE_C_DEC
00836 
00837 #undef PB_ASSOC_CLASS_NAME
00838 
00839 #undef PB_ASSOC_DIRECT_BASE_C_DEC
00840 
00841   private:
00842     typedef PB_ASSOC_BASE_C_DEC my_base;
00843 
00844     basic_hash_assoc_cntnr& 
00845     operator=(const PB_ASSOC_CLASS_C_DEC& r_other);
00846   };
00847 
00848 #include <ext/pb_assoc/detail/basic_hash_assoc_cntnr/constructors_destructor_fn_imps.hpp>
00849 #include <ext/pb_assoc/detail/basic_hash_assoc_cntnr/resize_fn_imps.hpp>
00850 
00851 #undef PB_ASSOC_CLASS_T_DEC
00852 
00853 #undef PB_ASSOC_CLASS_C_DEC
00854 
00855 #undef PB_ASSOC_BASE_C_DEC
00856 
00857 #define PB_ASSOC_CLASS_T_DEC \
00858     template< \
00859         typename Key, \
00860         typename Data, \
00861         class Hash_Fn, \
00862         class Eq_Fn, \
00863         class Comb_Hash_Fn, \
00864         class Resize_Policy, \
00865         bool Store_Hash, \
00866         class Allocator>
00867 
00868 #define PB_ASSOC_CLASS_C_DEC \
00869     cc_hash_assoc_cntnr< \
00870         Key, \
00871         Data, \
00872         Hash_Fn, \
00873         Eq_Fn, \
00874         Comb_Hash_Fn, \
00875         Resize_Policy, \
00876         Store_Hash, \
00877         Allocator>
00878 
00879 #define PB_ASSOC_BASE_C_DEC \
00880     basic_hash_assoc_cntnr< \
00881         Key, \
00882         Data, \
00883         Hash_Fn, \
00884         Eq_Fn, \
00885         Resize_Policy, \
00886         Store_Hash, \
00887         cc_hash_ds_tag, \
00888         pb_assoc::detail::typelist< \
00889             PB_ASSOC_TYPELIST_CHAIN1( \
00890                 Comb_Hash_Fn) >, \
00891         Allocator>
00892 
00893   template<typename Key,
00894        typename Data,
00895        class Hash_Fn = typename pb_assoc::detail::def_hash_fn<Key>::type,
00896        class Eq_Fn = typename pb_assoc::detail::def_eq_fn<Key>::type,
00897        class Comb_Hash_Fn = pb_assoc::detail::def_comb_hash_fn::type,
00898        class Resize_Policy =
00899        typename pb_assoc::detail::def_resize_policy<Comb_Hash_Fn>::type,
00900        bool Store_Hash = pb_assoc::detail::def_store_hash,
00901        class Allocator = std::allocator<char> >
00902   class cc_hash_assoc_cntnr : public PB_ASSOC_BASE_C_DEC
00903   {
00904   public:
00905     typedef Comb_Hash_Fn comb_hash_fn;
00906 
00907     cc_hash_assoc_cntnr();
00908 
00909     cc_hash_assoc_cntnr(const Hash_Fn& r_hash_fn);
00910 
00911     cc_hash_assoc_cntnr(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn);
00912 
00913     cc_hash_assoc_cntnr(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, 
00914             const Comb_Hash_Fn& r_comb_hash_fn);
00915 
00916     cc_hash_assoc_cntnr(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, 
00917             const Comb_Hash_Fn& r_comb_hash_fn, 
00918             const Resize_Policy& r_resize_policy);
00919 
00920     template<class It>
00921     cc_hash_assoc_cntnr(It first_it, It last_it);
00922 
00923     template<class It>
00924     cc_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn);
00925 
00926     template<class It>
00927     cc_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn, 
00928             const Eq_Fn& r_eq_fn);
00929 
00930     template<class It>
00931     cc_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Hash_Fn& r_comb_hash_fn);
00932 
00933     template<class It>
00934     cc_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Hash_Fn& r_comb_hash_fn, const Resize_Policy& r_resize_policy);
00935 
00936     cc_hash_assoc_cntnr(const PB_ASSOC_CLASS_C_DEC& r_other);
00937 
00938     virtual
00939     ~cc_hash_assoc_cntnr();
00940 
00941     PB_ASSOC_CLASS_C_DEC& 
00942     operator=(const PB_ASSOC_CLASS_C_DEC& r_other);
00943 
00944     void
00945     swap(PB_ASSOC_CLASS_C_DEC& r_other);
00946 
00947     comb_hash_fn& 
00948     get_comb_hash_fn();
00949 
00950     const comb_hash_fn& 
00951     get_comb_hash_fn() const;
00952 
00953   private:
00954     typedef PB_ASSOC_BASE_C_DEC my_base;
00955   };
00956 
00957 #include <ext/pb_assoc/detail/cc_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp>
00958 
00959 #undef PB_ASSOC_CLASS_T_DEC
00960 
00961 #undef PB_ASSOC_CLASS_C_DEC
00962 
00963 #undef PB_ASSOC_BASE_C_DEC
00964 
00965 #define PB_ASSOC_CLASS_T_DEC \
00966     template< \
00967         typename Key, \
00968         typename Data, \
00969         class Hash_Fn, \
00970         class Eq_Fn, \
00971         class Comb_Probe_Fn, \
00972         class Probe_Fn, \
00973         class Resize_Policy, \
00974         bool Store_Hash, \
00975         class Allocator>
00976 
00977 #define PB_ASSOC_CLASS_C_DEC \
00978     gp_hash_assoc_cntnr< \
00979         Key, \
00980         Data, \
00981         Hash_Fn, \
00982         Eq_Fn, \
00983         Comb_Probe_Fn, \
00984         Probe_Fn, \
00985         Resize_Policy, \
00986         Store_Hash, \
00987         Allocator>
00988 
00989 #define PB_ASSOC_BASE_C_DEC \
00990     basic_hash_assoc_cntnr< \
00991         Key, \
00992         Data, \
00993         Hash_Fn, \
00994         Eq_Fn, \
00995         Resize_Policy, \
00996         Store_Hash, \
00997         gp_hash_ds_tag, \
00998         pb_assoc::detail::typelist< \
00999             PB_ASSOC_TYPELIST_CHAIN2( Comb_Probe_Fn, Probe_Fn) >, \
01000         Allocator>
01001 
01002   template<typename Key,
01003        typename Data,
01004        class Hash_Fn = typename pb_assoc::detail::def_hash_fn<Key>::type,
01005        class Eq_Fn = typename pb_assoc::detail::def_eq_fn<Key>::type,
01006        class Comb_Probe_Fn = pb_assoc::detail::def_comb_hash_fn::type,
01007        class Probe_Fn = typename detail::def_probe_fn<Comb_Probe_Fn>::type,
01008        class Resize_Policy =
01009        typename pb_assoc::detail::def_resize_policy<Comb_Probe_Fn>::type,
01010 
01011        bool Store_Hash = pb_assoc::detail::def_store_hash,
01012        class Allocator = std::allocator<char> >
01013   class gp_hash_assoc_cntnr : public PB_ASSOC_BASE_C_DEC
01014   {
01015   public:
01016     typedef Comb_Probe_Fn comb_probe_fn;
01017     typedef Probe_Fn probe_fn;
01018 
01019     gp_hash_assoc_cntnr();
01020 
01021     gp_hash_assoc_cntnr(const Hash_Fn& r_hash_fn);
01022 
01023     gp_hash_assoc_cntnr(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn);
01024 
01025     gp_hash_assoc_cntnr(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, 
01026             const Comb_Probe_Fn& r_comb_probe_fn);
01027 
01028     gp_hash_assoc_cntnr(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, 
01029             const Comb_Probe_Fn& r_comb_probe_fn, 
01030             const Probe_Fn& r_probe_fn);
01031 
01032     gp_hash_assoc_cntnr(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, 
01033             const Comb_Probe_Fn& r_comb_probe_fn, 
01034             const Probe_Fn& r_probe_fn, 
01035             const Resize_Policy& r_resize_policy);
01036 
01037     template<class It>
01038     gp_hash_assoc_cntnr(It first_it, It last_it);
01039 
01040     template<class It>
01041     gp_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn);
01042 
01043     template<class It>
01044     gp_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn);
01045 
01046     template<class It>
01047     gp_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Probe_Fn& r_comb_probe_fn);
01048 
01049     template<class It>
01050     gp_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Probe_Fn& r_comb_probe_fn, const Probe_Fn& r_probe_fn);
01051 
01052     template<class It>
01053     gp_hash_assoc_cntnr(It first_it, It last_it, const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Probe_Fn& r_comb_probe_fn, const Probe_Fn& r_probe_fn, const Resize_Policy& r_resize_policy);
01054 
01055     gp_hash_assoc_cntnr(const PB_ASSOC_CLASS_C_DEC& r_other);
01056 
01057     virtual
01058     ~gp_hash_assoc_cntnr();
01059 
01060     PB_ASSOC_CLASS_C_DEC& 
01061     operator=(const PB_ASSOC_CLASS_C_DEC& r_other);
01062 
01063     void
01064     swap(PB_ASSOC_CLASS_C_DEC& r_other);
01065 
01066     comb_probe_fn& 
01067     get_comb_probe_fn();
01068 
01069     const comb_probe_fn& 
01070     get_comb_probe_fn() const;
01071 
01072     probe_fn& 
01073     get_probe_fn();
01074 
01075     const probe_fn& 
01076     get_probe_fn() const;
01077 
01078   private:
01079     typedef PB_ASSOC_BASE_C_DEC my_base;
01080   };
01081 
01082 #include <ext/pb_assoc/detail/gp_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp>
01083 
01084 #undef PB_ASSOC_CLASS_T_DEC
01085 
01086 #undef  PB_ASSOC_CLASS_C_DEC
01087 
01088 #undef  PB_ASSOC_BASE_C_DEC
01089 
01090 #define PB_ASSOC_CLASS_T_DEC \
01091     template< \
01092         typename Key, \
01093         typename Data, \
01094         class Cmp_Fn, \
01095         class DS_Tag, \
01096         class Node_Updator, \
01097         class Allocator>
01098 
01099 #define PB_ASSOC_CLASS_C_DEC \
01100     basic_tree_assoc_cntnr< \
01101         Key, \
01102         Data, \
01103         Cmp_Fn, \
01104         DS_Tag, \
01105         Node_Updator, \
01106         Allocator>
01107 
01108 #define PB_ASSOC_BASE_C_DEC \
01109     basic_assoc_cntnr< \
01110         Key, \
01111         Data, \
01112         DS_Tag, \
01113         pb_assoc::detail::typelist< \
01114             PB_ASSOC_TYPELIST_CHAIN2( Cmp_Fn, Node_Updator) >, \
01115         Allocator>
01116 
01117   template<typename Key,
01118        typename Data,
01119        class Cmp_Fn,
01120        class DS_Tag,
01121        class Node_Updator,
01122        class Allocator>
01123   class basic_tree_assoc_cntnr : public PB_ASSOC_BASE_C_DEC
01124   {
01125   public:
01126     typedef typename Allocator::size_type size_type;
01127 
01128     typedef
01129     typename Allocator::template rebind<
01130       Key>::other::const_reference
01131     const_key_reference;
01132 
01133     typedef Cmp_Fn cmp_fn;
01134 
01135     typedef Node_Updator node_updator;
01136 
01137     typedef typename PB_ASSOC_BASE_C_DEC::const_iterator const_iterator;
01138 
01139     typedef typename PB_ASSOC_BASE_C_DEC::iterator iterator;
01140 
01141     typedef
01142     typename PB_ASSOC_BASE_C_DEC::const_reverse_iterator
01143     const_reverse_iterator;
01144 
01145     typedef
01146     typename PB_ASSOC_BASE_C_DEC::reverse_iterator
01147     reverse_iterator;
01148 
01149     typedef
01150     typename PB_ASSOC_BASE_C_DEC::const_node_iterator
01151     const_node_iterator;
01152 
01153     typedef typename PB_ASSOC_BASE_C_DEC::node_iterator node_iterator;
01154 
01155     virtual
01156     ~basic_tree_assoc_cntnr();
01157 
01158     cmp_fn& 
01159     get_cmp_fn();
01160 
01161     const cmp_fn& 
01162     get_cmp_fn() const;
01163 
01164     node_updator& 
01165     get_node_updator();
01166 
01167     const node_updator& 
01168     get_node_updator() const;
01169 
01170     inline size_type
01171     erase(const_key_reference r_key);
01172 
01173     inline iterator
01174     erase(iterator it);
01175 
01176     inline reverse_iterator
01177     erase(reverse_iterator it)
01178     {
01179       return (my_base::erase(it));
01180     }
01181 
01182     inline reverse_iterator
01183     rbegin()
01184     {
01185       return (my_base::rbegin());
01186     }
01187 
01188     inline const_reverse_iterator
01189     rbegin() const
01190     {
01191       return (my_base::rbegin());
01192     }
01193 
01194     inline reverse_iterator
01195     rend()
01196     {
01197       return (my_base::rend());
01198     }
01199 
01200     inline const_reverse_iterator
01201     rend() const
01202     {
01203       return (my_base::rend());
01204     }
01205 
01206     inline node_iterator
01207     node_begin()
01208     {
01209       return (my_base::node_begin());
01210     }
01211 
01212     inline const_node_iterator
01213     node_begin() const
01214     {
01215       return (my_base::node_begin());
01216     }
01217 
01218     inline node_iterator
01219     node_end()
01220     {
01221       return (my_base::node_end());
01222     }
01223 
01224     inline const_node_iterator
01225     node_end() const
01226     {
01227       return (my_base::node_end());
01228     }
01229 
01230     void
01231     join(PB_ASSOC_CLASS_C_DEC& r_other);
01232 
01233     inline void
01234     split(const_key_reference r_key, PB_ASSOC_CLASS_C_DEC& r_other);
01235 
01236   protected:
01237 
01238 #define PB_ASSOC_CLASS_NAME basic_tree_assoc_cntnr
01239 
01240 #define PB_ASSOC_DIRECT_BASE_C_DEC PB_ASSOC_BASE_C_DEC
01241 
01242 #define PB_ASSOC_DIRECT_BASE_CAST_C_DEC \
01243     PB_ASSOC_DIRECT_BASE_C_DEC
01244 
01245 #include <ext/pb_assoc/detail/constructors_destructor_fn_imps.hpp>
01246 
01247 #undef PB_ASSOC_DIRECT_BASE_CAST_C_DEC
01248 
01249 #undef PB_ASSOC_CLASS_NAME
01250 
01251 #undef PB_ASSOC_DIRECT_BASE_C_DEC
01252 
01253   private:
01254     typedef PB_ASSOC_BASE_C_DEC my_base;
01255   };
01256 
01257 #include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/constructors_destructor_fn_imps.hpp>
01258 #include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/policy_access_fn_imps.hpp>
01259 #include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/range_iteration_fn_imps.hpp>
01260 #include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/r_range_iteration_fn_imps.hpp>
01261 #include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/node_iteration_fn_imps.hpp>
01262 #include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/split_join_fn_imps.hpp>
01263 #include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/erase_fn_imps.hpp>
01264 #include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/r_erase_fn_imps.hpp>
01265 
01266 #undef PB_ASSOC_CLASS_T_DEC
01267 
01268 #undef PB_ASSOC_CLASS_C_DEC
01269 
01270 #undef PB_ASSOC_BASE_C_DEC
01271 
01272 #define PB_ASSOC_CLASS_T_DEC \
01273     template< \
01274         typename Key, \
01275         typename Data, \
01276         class Cmp_Fn, \
01277         class Node_Updator, \
01278         class Allocator>
01279 
01280 #define PB_ASSOC_CLASS_C_DEC \
01281     basic_tree_assoc_cntnr< \
01282         Key, \
01283         Data, \
01284         Cmp_Fn, \
01285         ov_tree_ds_tag, \
01286         Node_Updator, \
01287         Allocator>
01288 
01289 #define PB_ASSOC_BASE_C_DEC \
01290     basic_assoc_cntnr< \
01291         Key, \
01292         Data, \
01293         ov_tree_ds_tag, \
01294         pb_assoc::detail::typelist< \
01295             PB_ASSOC_TYPELIST_CHAIN2( Cmp_Fn, Node_Updator) >, \
01296         Allocator>
01297 
01298   template<typename Key,
01299        typename Data,
01300        typename Cmp_Fn,
01301        typename Node_Updator,
01302        typename Allocator>
01303   class basic_tree_assoc_cntnr<Key, Data, Cmp_Fn, ov_tree_ds_tag, Node_Updator, Allocator> 
01304   : public PB_ASSOC_BASE_C_DEC
01305   {
01306   public:
01307     typedef typename Allocator::size_type size_type;
01308 
01309     typedef
01310     typename Allocator::template rebind<
01311       Key>::other::const_reference
01312     const_key_reference;
01313 
01314     typedef Cmp_Fn cmp_fn;
01315 
01316     typedef Node_Updator node_updator;
01317 
01318     typedef typename PB_ASSOC_BASE_C_DEC::const_iterator const_iterator;
01319 
01320     typedef typename PB_ASSOC_BASE_C_DEC::iterator iterator;
01321 
01322     typedef
01323     typename PB_ASSOC_BASE_C_DEC::const_node_iterator
01324     const_node_iterator;
01325 
01326     typedef typename PB_ASSOC_BASE_C_DEC::node_iterator node_iterator;
01327 
01328     virtual
01329     ~basic_tree_assoc_cntnr();
01330 
01331     cmp_fn& 
01332     get_cmp_fn();
01333 
01334     const cmp_fn& 
01335     get_cmp_fn() const;
01336 
01337     node_updator& 
01338     get_node_updator();
01339 
01340     const node_updator& 
01341     get_node_updator() const;
01342 
01343     inline size_type
01344     erase(const_key_reference r_key);
01345 
01346     inline iterator
01347     erase(iterator it);
01348 
01349     inline node_iterator
01350     node_begin()
01351     {
01352       return (my_base::node_begin());
01353     }
01354 
01355     inline const_node_iterator
01356     node_begin() const
01357     {
01358       return (my_base::node_begin());
01359     }
01360 
01361     inline node_iterator
01362     node_end()
01363     {
01364       return (my_base::node_end());
01365     }
01366 
01367     inline const_node_iterator
01368     node_end() const
01369     {
01370       return (my_base::node_end());
01371     }
01372 
01373     void
01374     join(PB_ASSOC_CLASS_C_DEC& r_other);
01375 
01376     inline void
01377     split(const_key_reference r_key, PB_ASSOC_CLASS_C_DEC& r_other);
01378 
01379   protected:
01380 
01381 #define PB_ASSOC_CLASS_NAME basic_tree_assoc_cntnr
01382 
01383 #define PB_ASSOC_DIRECT_BASE_C_DEC PB_ASSOC_BASE_C_DEC
01384 
01385 #define PB_ASSOC_DIRECT_BASE_CAST_C_DEC \
01386     PB_ASSOC_DIRECT_BASE_C_DEC
01387 
01388 #include <ext/pb_assoc/detail/constructors_destructor_fn_imps.hpp>
01389 
01390 #undef PB_ASSOC_DIRECT_BASE_CAST_C_DEC
01391 
01392 #undef PB_ASSOC_CLASS_NAME
01393 
01394 #undef PB_ASSOC_DIRECT_BASE_C_DEC
01395 
01396   private:
01397     typedef PB_ASSOC_BASE_C_DEC my_base;
01398   };
01399 
01400 #include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/constructors_destructor_fn_imps.hpp>
01401 #include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/policy_access_fn_imps.hpp>
01402 #include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/range_iteration_fn_imps.hpp>
01403 #include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/node_iteration_fn_imps.hpp>
01404 #include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/split_join_fn_imps.hpp>
01405 #include <ext/pb_assoc/detail/basic_tree_assoc_cntnr/erase_fn_imps.hpp>
01406 
01407 #undef PB_ASSOC_CLASS_T_DEC
01408 
01409 #undef PB_ASSOC_CLASS_C_DEC
01410 
01411 #undef PB_ASSOC_BASE_C_DEC
01412 
01413 #define PB_ASSOC_CLASS_T_DEC \
01414     template< \
01415         typename Key, \
01416         typename Data, \
01417         class Cmp_Fn, \
01418         class DS_Tag, \
01419         class Node_Updator, \
01420         class Allocator>
01421 
01422 #define PB_ASSOC_CLASS_C_DEC \
01423     tree_assoc_cntnr< \
01424         Key, \
01425         Data, \
01426         Cmp_Fn, \
01427         DS_Tag, \
01428         Node_Updator, \
01429         Allocator>
01430 
01431 #define PB_ASSOC_BASE_C_DEC \
01432     basic_tree_assoc_cntnr< \
01433         Key, \
01434         Data, \
01435         Cmp_Fn, \
01436         DS_Tag, \
01437         Node_Updator, \
01438         Allocator>
01439 
01440   template<typename Key, typename Data, class Cmp_Fn =  std::less<Key>,
01441        typename DS_Tag = rb_tree_ds_tag,
01442        typename Node_Updator = pb_assoc::detail::def_node_updator,
01443        typename Allocator = std::allocator<char> >
01444   class tree_assoc_cntnr : public PB_ASSOC_BASE_C_DEC
01445   {
01446     typedef Cmp_Fn cmp_fn;
01447     typedef Node_Updator node_updator;
01448 
01449   public:
01450     tree_assoc_cntnr();
01451     tree_assoc_cntnr(const cmp_fn& r_cmp_fn);
01452     tree_assoc_cntnr(const cmp_fn& r_cmp_fn, const Node_Updator&r);
01453  
01454     template<typename It>
01455       tree_assoc_cntnr(It first_it, It last_it);
01456 
01457     template<typename It>
01458       tree_assoc_cntnr(It first_it, It last_it, const cmp_fn& r_cmp_fn);
01459 
01460     template<typename It>
01461       tree_assoc_cntnr(It, It, const cmp_fn&, const Node_Updator&);
01462 
01463     tree_assoc_cntnr(const PB_ASSOC_CLASS_C_DEC& r_other);
01464 
01465     virtual
01466     ~tree_assoc_cntnr();
01467 
01468     PB_ASSOC_CLASS_C_DEC& 
01469     operator=(const PB_ASSOC_CLASS_C_DEC& r_other);
01470 
01471     void
01472     swap(PB_ASSOC_CLASS_C_DEC& r_other);
01473 
01474   private:
01475     typedef PB_ASSOC_BASE_C_DEC my_base;
01476   };
01477 
01478 #include <ext/pb_assoc/detail/tree_assoc_cntnr/constructor_destructor_fn_imps.hpp>
01479 
01480 #undef PB_ASSOC_CLASS_T_DEC
01481 
01482 #undef PB_ASSOC_CLASS_C_DEC
01483 
01484 #undef PB_ASSOC_BASE_C_DEC
01485 
01486 #define PB_ASSOC_CLASS_T_DEC \
01487     template< \
01488         typename Key, \
01489         typename Data, \
01490         class Eq_Fn, \
01491         class Update_Policy, \
01492         class Allocator>
01493 
01494 #define PB_ASSOC_CLASS_C_DEC \
01495     lu_assoc_cntnr< \
01496         Key, \
01497         Data, \
01498         Eq_Fn, \
01499         Update_Policy, \
01500         Allocator>
01501 
01502 #define PB_ASSOC_BASE_C_DEC \
01503     basic_assoc_cntnr< \
01504         Key, \
01505         Data, \
01506         lu_ds_tag, \
01507         pb_assoc::detail::typelist< \
01508             PB_ASSOC_TYPELIST_CHAIN2( Eq_Fn, Update_Policy) >, \
01509         Allocator>
01510 
01511   template<typename Key,
01512        typename Data,
01513        typename Eq_Fn = typename pb_assoc::detail::def_eq_fn<Key>::type,
01514        typename Update_Policy = pb_assoc::detail::def_update_policy::type,
01515        typename Allocator = std::allocator<char> >
01516   class lu_assoc_cntnr : public PB_ASSOC_BASE_C_DEC
01517   {
01518   public:
01519     typedef Eq_Fn eq_fn;
01520     typedef Allocator allocator;
01521     typedef Update_Policy update_policy;
01522     
01523     lu_assoc_cntnr();    
01524     lu_assoc_cntnr(const Eq_Fn& r_eq_fn);    
01525     lu_assoc_cntnr(const Eq_Fn& r_eq_fn, const Update_Policy& r_update_policy);
01526     
01527     template<typename It>
01528       lu_assoc_cntnr(It first_it, It last_it);
01529 
01530     template<typename It>
01531       lu_assoc_cntnr(It first_it, It last_it, const Eq_Fn& r_eq_fn);
01532 
01533     template<typename It>
01534       lu_assoc_cntnr(It, It, const Eq_Fn&, const Update_Policy&);
01535 
01536     lu_assoc_cntnr(const PB_ASSOC_CLASS_C_DEC& r_other);
01537 
01538     virtual
01539     ~lu_assoc_cntnr();
01540 
01541     PB_ASSOC_CLASS_C_DEC& 
01542     operator=(const PB_ASSOC_CLASS_C_DEC& r_other);
01543 
01544     void
01545     swap(PB_ASSOC_CLASS_C_DEC& r_other);
01546 
01547     eq_fn& 
01548     get_eq_fn();
01549 
01550     const eq_fn& 
01551     get_eq_fn() const;
01552 
01553     update_policy& 
01554     get_update_policy();
01555 
01556     const update_policy& 
01557     get_update_policy() const;
01558 
01559   private:
01560     typedef PB_ASSOC_BASE_C_DEC my_base;
01561   };
01562 
01563 #include <ext/pb_assoc/detail/lu_assoc_cntnr/constructor_destructor_fn_imps.hpp>
01564 #include <ext/pb_assoc/detail/lu_assoc_cntnr/policy_access_fn_imps.hpp>
01565 
01566 #undef PB_ASSOC_CLASS_T_DEC
01567 
01568 #undef PB_ASSOC_CLASS_C_DEC
01569 
01570 #undef PB_ASSOC_BASE_C_DEC
01571 
01572 #undef PB_ASSOC_TYPELIST_CHAIN1
01573 #undef PB_ASSOC_TYPELIST_CHAIN2
01574 #undef PB_ASSOC_TYPELIST_CHAIN3
01575 #undef PB_ASSOC_TYPELIST_CHAIN4
01576 #undef PB_ASSOC_TYPELIST_CHAIN5
01577 #undef PB_ASSOC_TYPELIST_CHAIN6
01578 #undef PB_ASSOC_TYPELIST_CHAIN7
01579 #undef PB_ASSOC_TYPELIST_CHAIN8
01580 #undef PB_ASSOC_TYPELIST_CHAIN9
01581 #undef PB_ASSOC_TYPELIST_CHAIN10
01582 #undef PB_ASSOC_TYPELIST_CHAIN11
01583 #undef PB_ASSOC_TYPELIST_CHAIN12
01584 #undef PB_ASSOC_TYPELIST_CHAIN13
01585 #undef PB_ASSOC_TYPELIST_CHAIN14
01586 #undef PB_ASSOC_TYPELIST_CHAIN15
01587 
01588 } // namespace pb_assoc
01589 
01590 #endif // #ifndef ASSOC_CNTNR_HPP

Generated on Tue Feb 2 16:55:44 2010 for GNU C++ STL by  doxygen 1.4.7