00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 
00049 #ifndef MFCSTL_INCL_MFCSTL_COLLECTIONS_HPP_CSTRING_ADAPTORS
00050 #define MFCSTL_INCL_MFCSTL_COLLECTIONS_HPP_CSTRING_ADAPTORS
00051 
00052 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00053 # define MFCSTL_VER_MFCSTL_COLLECTIONS_HPP_CSTRING_ADAPTORS_MAJOR       4
00054 # define MFCSTL_VER_MFCSTL_COLLECTIONS_HPP_CSTRING_ADAPTORS_MINOR       1
00055 # define MFCSTL_VER_MFCSTL_COLLECTIONS_HPP_CSTRING_ADAPTORS_REVISION    1
00056 # define MFCSTL_VER_MFCSTL_COLLECTIONS_HPP_CSTRING_ADAPTORS_EDIT        89
00057 #endif 
00058 
00059 
00060 
00061 
00062 
00063 
00064 
00065 
00066 
00067 
00068 
00069 
00070 
00071 
00072 
00073 #ifndef MFCSTL_INCL_MFCSTL_HPP_MFCSTL
00074 # include <mfcstl/mfcstl.hpp>
00075 #endif 
00076 
00077 #if defined(STLSOFT_COMPILER_IS_MSVC) && \
00078     _MSC_VER < 1100
00079 # error mfcstl_cstring_veneer.h is not compatible with Visual C++ 4.2 or earlier
00080 #endif 
00081 
00082 #ifndef MFCSTL_INCL_MFCSTL_MEMORY_HPP_AFX_ALLOCATOR
00083 # include <mfcstl/memory/afx_allocator.hpp>
00084 #endif 
00085 #ifndef STLSOFT_INCL_STLSOFT_UTIL_STD_HPP_ITERATOR_HELPER
00086 # include <stlsoft/util/std/iterator_helper.hpp>
00087 #endif 
00088 #ifndef STLSOFT_INCL_STLSOFT_UTIL_HPP_CONSTRAINTS
00089 # include <stlsoft/util/constraints.hpp>
00090 #endif 
00091 #ifndef STLSOFT_INCL_STLSOFT_COLLECTIONS_UTIL_HPP_COLLECTIONS
00092 # include <stlsoft/collections/util/collections.hpp>
00093 #endif 
00094 #ifndef STLSOFT_INCL_STLSOFT_UTIL_STD_LIBRARY_DISCRIMINATOR
00095 # include <stlsoft/util/std/library_discriminator.hpp>
00096 #endif 
00097 #ifndef STLSOFT_INCL_STLSOFT_STRING_HPP_STRING_TRAITS_FWD
00098 # include <stlsoft/string/string_traits_fwd.hpp>
00099 #endif 
00100 
00101 
00102 
00103 
00104 
00105 #ifndef _MFCSTL_NO_NAMESPACE
00106 # if defined(_STLSOFT_NO_NAMESPACE) || \
00107      defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00108 
00109 namespace mfcstl
00110 {
00111 # else
00112 
00113 
00114 namespace stlsoft
00115 {
00116 
00117 namespace mfcstl_project
00118 {
00119 
00120 # endif 
00121 #endif 
00122 
00123 
00124 
00125 
00126 
00135 template<ss_typename_param_k I>
00136 class CString_adaptor_base
00137     : public stlsoft_ns_qual(stl_collection_tag)
00138 {
00141 private:
00142     typedef I                                               interface_type;
00143     typedef CString_adaptor_base<I>                         class_type;
00144 public:
00146     typedef TCHAR                                           value_type;
00148     typedef afx_allocator<value_type>                       allocator_type;
00150     typedef LPTSTR                                          pointer;
00152     typedef LPCTSTR                                         const_pointer;
00154     typedef TCHAR&                                          reference;
00156     typedef TCHAR const&                                    const_reference;
00158     typedef ms_size_t                                       size_type;
00160     typedef ms_ptrdiff_t                                    difference_type;
00161 #if !defined(STLSOFT_LF_BIDIRECTIONAL_ITERATOR_SUPPORT)
00163     typedef LPTSTR                                          iterator;
00165     typedef LPCTSTR                                         const_iterator;
00166 #else 
00168     typedef
00169 # if !defined(STLSOFT_COMPILER_IS_BORLAND)
00170            ss_typename_type_k
00171 # endif 
00172                        pointer_iterator <   value_type
00173                                         ,   pointer
00174                                         ,   reference
00175                                         >::type             iterator;
00177     typedef
00178 # if !defined(STLSOFT_COMPILER_IS_BORLAND)
00179          ss_typename_type_k
00180 # endif 
00181                        pointer_iterator <   value_type const
00182                                         ,   const_pointer
00183                                         ,   const_reference
00184                                         >::type             const_iterator;
00185 
00187     typedef reverse_iterator_base       <   iterator
00188                                         ,   value_type
00189                                         ,   reference
00190                                         ,   pointer
00191                                         ,   difference_type
00192                                         >                   reverse_iterator;
00193 
00195     typedef const_reverse_iterator_base <   const_iterator
00196                                         ,   value_type const
00197                                         ,   const_reference
00198                                         ,   const_pointer
00199                                         ,   difference_type
00200                                         >                   const_reverse_iterator;
00201 #endif 
00203     typedef ms_bool_t                                       bool_type;
00205 
00208 public:
00209     allocator_type  get_allocator() const;
00211 
00214 public:
00216     CString         &get_CString()
00217     {
00218         return static_cast<interface_type*>(this)->get_actual_string();
00219     }
00221     CString const   &get_CString() const
00222     {
00223         return static_cast<interface_type const*>(this)->get_actual_string();
00224     }
00226 
00229 public:
00231     class_type  &assign(LPCSTR s);
00233     class_type  &assign(LPCWSTR s);
00235     class_type  &assign(unsigned char const* s);
00237     class_type  &assign(LPCSTR s, size_type n);
00239     class_type  &assign(LPCWSTR s, size_type n);
00241     class_type  &assign(unsigned char const* s, size_type n);
00243     class_type  &assign(class_type const& s);
00245     class_type  &assign(class_type const& str, size_type pos, size_type n);
00247     class_type  &assign(size_type n, value_type ch);
00249 #if defined(STLSOFT_CF_STD_LIBRARY_DINKUMWARE_VC_VERSION) && \
00250     STLSOFT_CF_STD_LIBRARY_DINKUMWARE_VC_VERSION == STLSOFT_CF_DINKUMWARE_VC_VERSION_7_0
00251 # pragma message("TODO: Fix this up before 1.9.1 proper")
00252     class_type  &assign(LPCTSTR first, LPCTSTR last);
00253 #else 
00254     class_type  &assign(const_iterator first, const_iterator last);
00255 #endif 
00257 
00260 public:
00264     iterator                begin();
00268     iterator                end();
00272     const_iterator          begin() const;
00276     const_iterator          end() const;
00277 #ifdef STLSOFT_LF_BIDIRECTIONAL_ITERATOR_SUPPORT
00281     reverse_iterator        rbegin();
00285     reverse_iterator        rend();
00289     const_reverse_iterator  rbegin() const;
00293     const_reverse_iterator  rend() const;
00294 #endif 
00296 
00299 protected:
00300     reference       subscript_(size_type index);
00301     const_reference subscript_(size_type index) const;
00302 public:
00306     reference       at(size_type index);
00310     const_reference at(size_type index) const;
00312 
00315 public:
00317     size_type       length() const;
00319     size_type       size() const;
00321     bool_type       empty() const;
00323     const_pointer   c_str() const;
00325     const_pointer   data() const;
00327 };
00328 
00335 class CString_cadaptor
00336     : public CString
00337     , public CString_adaptor_base<CString_cadaptor>
00338 {
00341 private:
00342     typedef CString_adaptor_base<CString_cadaptor>  parent_class_type;
00343 public:
00345     typedef CString_cadaptor                        class_type;
00347 
00348 public:
00350     CString_cadaptor();
00352     CString_cadaptor(class_type const& rhs);
00354     ss_explicit_k CString_cadaptor(CString const& rhs);
00356     ss_explicit_k CString_cadaptor(LPCSTR s);
00358     ss_explicit_k CString_cadaptor(LPCWSTR s);
00360     ss_explicit_k CString_cadaptor(unsigned char const* s);
00362     CString_cadaptor(LPCTSTR from, LPCTSTR to);
00364     CString_cadaptor(LPCTSTR from, size_type length);
00366     CString_cadaptor(class_type const& str, size_type pos, size_type n);
00368     CString_cadaptor(ms_size_t cch, TCHAR ch);
00369 
00371     class_type const& operator =(class_type const& rhs);
00373     class_type const& operator =(CString const& rhs);
00375     class_type const& operator =(LPCSTR s);
00377     class_type const& operator =(LPCWSTR s);
00379     class_type const& operator =(unsigned char const* s);
00380 
00381 private:
00382     friend class CString_adaptor_base<CString_cadaptor>;
00383 
00384     CString         &get_actual_string()
00385     {
00386         return *this;
00387     }
00388     CString const   &get_actual_string() const
00389     {
00390         return *this;
00391     }
00392 };
00393 
00400 class CString_iadaptor
00401     : public CString_adaptor_base<CString_iadaptor>
00402 {
00405 private:
00406     typedef CString_adaptor_base<CString_iadaptor>  parent_class_type;
00407 public:
00409     typedef CString_iadaptor                        class_type;
00411 
00414 public:
00415     CString_iadaptor(CString &str);
00416     CString_iadaptor(CString *str);
00418 
00420     class_type const& operator =(class_type const& rhs);
00422     class_type const& operator =(CString const& rhs);
00424     class_type const& operator =(LPCSTR s);
00426     class_type const& operator =(LPCWSTR s);
00428     class_type const& operator =(unsigned char const* s);
00429 
00432 public:
00436     reference       operator [](size_type index);
00440     const_reference operator [](size_type index) const;
00442 
00445 private:
00446     friend class CString_adaptor_base<CString_iadaptor>;
00447 
00448     CString         &get_actual_string()
00449     {
00450         return *m_str;
00451     }
00452     CString const   &get_actual_string() const
00453     {
00454         return *m_str;
00455     }
00457 
00460 private:
00461     CString *m_str;
00463 };
00464 
00471 class const_CString_iadaptor
00472     : public CString_adaptor_base<const_CString_iadaptor>
00473 {
00476 private:
00477     typedef CString_adaptor_base<const_CString_iadaptor>    parent_class_type;
00478 public:
00480     typedef CString_iadaptor                                class_type;
00482 
00485 public:
00486     const_CString_iadaptor(CString const& str);
00487     const_CString_iadaptor(CString const* str);
00489 
00492 public:
00496     const_reference operator [](size_type index) const;
00498 
00501 private:
00502     friend class CString_adaptor_base<const_CString_iadaptor>;
00503 
00504     CString const   &get_actual_string() const
00505     {
00506         return *m_str;
00507     }
00509 
00512 private:
00513     CString const   *m_str;
00515 };
00516 
00517 
00518 
00519 
00520 
00521 
00522 
00523 inline ms_bool_t operator ==(CString_cadaptor const& lhs, CString_cadaptor const& rhs)
00524 {
00525     return lhs.get_CString() == rhs.get_CString();
00526 }
00527 inline ms_bool_t operator ==(CString_cadaptor const& lhs, CString const& rhs)
00528 {
00529     return lhs.get_CString() == rhs;
00530 }
00531 inline ms_bool_t operator ==(CString const& lhs, CString_cadaptor const& rhs)
00532 {
00533     return lhs == rhs.get_CString();
00534 }
00535 inline ms_bool_t operator ==(CString_cadaptor const& lhs, LPCSTR rhs)
00536 {
00537     return lhs.get_CString() == rhs;
00538 }
00539 inline ms_bool_t operator ==(LPCSTR lhs, CString_cadaptor const& rhs)
00540 {
00541     return lhs == rhs.get_CString();
00542 }
00543 inline ms_bool_t operator ==(CString_cadaptor const& lhs, LPCWSTR rhs)
00544 {
00545     return lhs.get_CString() == CString(rhs);
00546 }
00547 inline ms_bool_t operator ==(LPCWSTR lhs, CString_cadaptor const& rhs)
00548 {
00549     return CString(lhs) == rhs.get_CString();
00550 }
00551 inline ms_bool_t operator ==(CString_cadaptor const& lhs, unsigned char const* rhs)
00552 {
00553     return lhs.get_CString() == CString(rhs);
00554 }
00555 inline ms_bool_t operator ==(unsigned char const* lhs, CString_cadaptor const& rhs)
00556 {
00557     return CString(lhs) == rhs.get_CString();
00558 }
00559 
00560 inline ms_bool_t operator ==(CString_iadaptor const& lhs, CString_iadaptor const& rhs)
00561 {
00562     return lhs.get_CString() == rhs.get_CString();
00563 }
00564 inline ms_bool_t operator ==(CString_iadaptor const& lhs, CString const& rhs)
00565 {
00566     return lhs.get_CString() == rhs;
00567 }
00568 inline ms_bool_t operator ==(CString const& lhs, CString_iadaptor const& rhs)
00569 {
00570     return lhs == rhs.get_CString();
00571 }
00572 inline ms_bool_t operator ==(CString_iadaptor const& lhs, LPCSTR rhs)
00573 {
00574     return lhs.get_CString() == rhs;
00575 }
00576 inline ms_bool_t operator ==(LPCSTR lhs, CString_iadaptor const& rhs)
00577 {
00578     return lhs == rhs.get_CString();
00579 }
00580 inline ms_bool_t operator ==(CString_iadaptor const& lhs, LPCWSTR rhs)
00581 {
00582     return lhs.get_CString() == CString(rhs);
00583 }
00584 inline ms_bool_t operator ==(LPCWSTR lhs, CString_iadaptor const& rhs)
00585 {
00586     return CString(lhs) == rhs.get_CString();
00587 }
00588 inline ms_bool_t operator ==(CString_iadaptor const& lhs, unsigned char const* rhs)
00589 {
00590     return lhs.get_CString() == CString(rhs);
00591 }
00592 inline ms_bool_t operator ==(unsigned char const* lhs, CString_iadaptor const& rhs)
00593 {
00594     return CString(lhs) == rhs.get_CString();
00595 }
00596 
00597 inline ms_bool_t operator ==(const_CString_iadaptor const& lhs, const_CString_iadaptor const& rhs)
00598 {
00599     return lhs.get_CString() == rhs.get_CString();
00600 }
00601 inline ms_bool_t operator ==(const_CString_iadaptor const& lhs, CString const& rhs)
00602 {
00603     return lhs.get_CString() == rhs;
00604 }
00605 inline ms_bool_t operator ==(CString const& lhs, const_CString_iadaptor const& rhs)
00606 {
00607     return lhs == rhs.get_CString();
00608 }
00609 inline ms_bool_t operator ==(const_CString_iadaptor const& lhs, LPCSTR rhs)
00610 {
00611     return lhs.get_CString() == rhs;
00612 }
00613 inline ms_bool_t operator ==(LPCSTR lhs, const_CString_iadaptor const& rhs)
00614 {
00615     return lhs == rhs.get_CString();
00616 }
00617 inline ms_bool_t operator ==(const_CString_iadaptor const& lhs, LPCWSTR rhs)
00618 {
00619     return lhs.get_CString() == CString(rhs);
00620 }
00621 inline ms_bool_t operator ==(LPCWSTR lhs, const_CString_iadaptor const& rhs)
00622 {
00623     return CString(lhs) == rhs.get_CString();
00624 }
00625 inline ms_bool_t operator ==(const_CString_iadaptor const& lhs, unsigned char const* rhs)
00626 {
00627     return lhs.get_CString() == CString(rhs);
00628 }
00629 inline ms_bool_t operator ==(unsigned char const* lhs, const_CString_iadaptor const& rhs)
00630 {
00631     return CString(lhs) == rhs.get_CString();
00632 }
00633 
00634 
00635 
00636 inline ms_bool_t operator !=(CString_cadaptor const& lhs, CString_cadaptor const& rhs)
00637 {
00638     return lhs.get_CString() != rhs.get_CString();
00639 }
00640 inline ms_bool_t operator !=(CString_cadaptor const& lhs, CString const& rhs)
00641 {
00642     return lhs.get_CString() != rhs;
00643 }
00644 inline ms_bool_t operator !=(CString const& lhs, CString_cadaptor const& rhs)
00645 {
00646     return lhs != rhs.get_CString();
00647 }
00648 inline ms_bool_t operator !=(CString_cadaptor const& lhs, LPCSTR rhs)
00649 {
00650     return lhs.get_CString() != rhs;
00651 }
00652 inline ms_bool_t operator !=(LPCSTR lhs, CString_cadaptor const& rhs)
00653 {
00654     return lhs != rhs.get_CString();
00655 }
00656 inline ms_bool_t operator !=(CString_cadaptor const& lhs, LPCWSTR rhs)
00657 {
00658     return lhs.get_CString() != CString(rhs);
00659 }
00660 inline ms_bool_t operator !=(LPCWSTR lhs, CString_cadaptor const& rhs)
00661 {
00662     return CString(lhs) != rhs.get_CString();
00663 }
00664 inline ms_bool_t operator !=(CString_cadaptor const& lhs, unsigned char const* rhs)
00665 {
00666     return lhs.get_CString() != CString(rhs);
00667 }
00668 inline ms_bool_t operator !=(unsigned char const* lhs, CString_cadaptor const& rhs)
00669 {
00670     return CString(lhs) != rhs.get_CString();
00671 }
00672 
00673 inline ms_bool_t operator !=(CString_iadaptor const& lhs, CString_iadaptor const& rhs)
00674 {
00675     return lhs.get_CString() != rhs.get_CString();
00676 }
00677 inline ms_bool_t operator !=(CString_iadaptor const& lhs, CString const& rhs)
00678 {
00679     return lhs.get_CString() != rhs;
00680 }
00681 inline ms_bool_t operator !=(CString const& lhs, CString_iadaptor const& rhs)
00682 {
00683     return lhs != rhs.get_CString();
00684 }
00685 inline ms_bool_t operator !=(CString_iadaptor const& lhs, LPCSTR rhs)
00686 {
00687     return lhs.get_CString() != rhs;
00688 }
00689 inline ms_bool_t operator !=(LPCSTR lhs, CString_iadaptor const& rhs)
00690 {
00691     return lhs != rhs.get_CString();
00692 }
00693 inline ms_bool_t operator !=(CString_iadaptor const& lhs, LPCWSTR rhs)
00694 {
00695     return lhs.get_CString() != CString(rhs);
00696 }
00697 inline ms_bool_t operator !=(LPCWSTR lhs, CString_iadaptor const& rhs)
00698 {
00699     return CString(lhs) != rhs.get_CString();
00700 }
00701 inline ms_bool_t operator !=(CString_iadaptor const& lhs, unsigned char const* rhs)
00702 {
00703     return lhs.get_CString() != CString(rhs);
00704 }
00705 inline ms_bool_t operator !=(unsigned char const* lhs, CString_iadaptor const& rhs)
00706 {
00707     return CString(lhs) != rhs.get_CString();
00708 }
00709 
00710 inline ms_bool_t operator !=(const_CString_iadaptor const& lhs, const_CString_iadaptor const& rhs)
00711 {
00712     return lhs.get_CString() != rhs.get_CString();
00713 }
00714 inline ms_bool_t operator !=(const_CString_iadaptor const& lhs, CString const& rhs)
00715 {
00716     return lhs.get_CString() != rhs;
00717 }
00718 inline ms_bool_t operator !=(CString const& lhs, const_CString_iadaptor const& rhs)
00719 {
00720     return lhs != rhs.get_CString();
00721 }
00722 inline ms_bool_t operator !=(const_CString_iadaptor const& lhs, LPCSTR rhs)
00723 {
00724     return lhs.get_CString() != rhs;
00725 }
00726 inline ms_bool_t operator !=(LPCSTR lhs, const_CString_iadaptor const& rhs)
00727 {
00728     return lhs != rhs.get_CString();
00729 }
00730 inline ms_bool_t operator !=(const_CString_iadaptor const& lhs, LPCWSTR rhs)
00731 {
00732     return lhs.get_CString() != CString(rhs);
00733 }
00734 inline ms_bool_t operator !=(LPCWSTR lhs, const_CString_iadaptor const& rhs)
00735 {
00736     return CString(lhs) != rhs.get_CString();
00737 }
00738 inline ms_bool_t operator !=(const_CString_iadaptor const& lhs, unsigned char const* rhs)
00739 {
00740     return lhs.get_CString() != CString(rhs);
00741 }
00742 inline ms_bool_t operator !=(unsigned char const* lhs, const_CString_iadaptor const& rhs)
00743 {
00744     return CString(lhs) != rhs.get_CString();
00745 }
00746 
00747 
00748 
00749 inline ms_bool_t operator <(CString_cadaptor const& lhs, CString_cadaptor const& rhs)
00750 {
00751     return lhs.get_CString() < rhs.get_CString();
00752 }
00753 inline ms_bool_t operator <(CString_cadaptor const& lhs, CString const& rhs)
00754 {
00755     return lhs.get_CString() < rhs;
00756 }
00757 inline ms_bool_t operator <(CString const& lhs, CString_cadaptor const& rhs)
00758 {
00759     return lhs < rhs.get_CString();
00760 }
00761 inline ms_bool_t operator <(CString_cadaptor const& lhs, LPCSTR rhs)
00762 {
00763     return lhs.get_CString() < rhs;
00764 }
00765 inline ms_bool_t operator <(LPCSTR lhs, CString_cadaptor const& rhs)
00766 {
00767     return lhs < rhs.get_CString();
00768 }
00769 inline ms_bool_t operator <(CString_cadaptor const& lhs, LPCWSTR rhs)
00770 {
00771     return lhs.get_CString() < CString(rhs);
00772 }
00773 inline ms_bool_t operator <(LPCWSTR lhs, CString_cadaptor const& rhs)
00774 {
00775     return CString(lhs) < rhs.get_CString();
00776 }
00777 inline ms_bool_t operator <(CString_cadaptor const& lhs, unsigned char const* rhs)
00778 {
00779     return lhs.get_CString() < CString(rhs);
00780 }
00781 inline ms_bool_t operator <(unsigned char const* lhs, CString_cadaptor const& rhs)
00782 {
00783     return CString(lhs) < rhs.get_CString();
00784 }
00785 
00786 inline ms_bool_t operator <(CString_iadaptor const& lhs, CString_iadaptor const& rhs)
00787 {
00788     return lhs.get_CString() < rhs.get_CString();
00789 }
00790 inline ms_bool_t operator <(CString_iadaptor const& lhs, CString const& rhs)
00791 {
00792     return lhs.get_CString() < rhs;
00793 }
00794 inline ms_bool_t operator <(CString const& lhs, CString_iadaptor const& rhs)
00795 {
00796     return lhs < rhs.get_CString();
00797 }
00798 inline ms_bool_t operator <(CString_iadaptor const& lhs, LPCSTR rhs)
00799 {
00800     return lhs.get_CString() < rhs;
00801 }
00802 inline ms_bool_t operator <(LPCSTR lhs, CString_iadaptor const& rhs)
00803 {
00804     return lhs < rhs.get_CString();
00805 }
00806 inline ms_bool_t operator <(CString_iadaptor const& lhs, LPCWSTR rhs)
00807 {
00808     return lhs.get_CString() < CString(rhs);
00809 }
00810 inline ms_bool_t operator <(LPCWSTR lhs, CString_iadaptor const& rhs)
00811 {
00812     return CString(lhs) < rhs.get_CString();
00813 }
00814 inline ms_bool_t operator <(CString_iadaptor const& lhs, unsigned char const* rhs)
00815 {
00816     return lhs.get_CString() < CString(rhs);
00817 }
00818 inline ms_bool_t operator <(unsigned char const* lhs, CString_iadaptor const& rhs)
00819 {
00820     return CString(lhs) < rhs.get_CString();
00821 }
00822 
00823 inline ms_bool_t operator <(const_CString_iadaptor const& lhs, const_CString_iadaptor const& rhs)
00824 {
00825     return lhs.get_CString() < rhs.get_CString();
00826 }
00827 inline ms_bool_t operator <(const_CString_iadaptor const& lhs, CString const& rhs)
00828 {
00829     return lhs.get_CString() < rhs;
00830 }
00831 inline ms_bool_t operator <(CString const& lhs, const_CString_iadaptor const& rhs)
00832 {
00833     return lhs < rhs.get_CString();
00834 }
00835 inline ms_bool_t operator <(const_CString_iadaptor const& lhs, LPCSTR rhs)
00836 {
00837     return lhs.get_CString() < rhs;
00838 }
00839 inline ms_bool_t operator <(LPCSTR lhs, const_CString_iadaptor const& rhs)
00840 {
00841     return lhs < rhs.get_CString();
00842 }
00843 inline ms_bool_t operator <(const_CString_iadaptor const& lhs, LPCWSTR rhs)
00844 {
00845     return lhs.get_CString() < CString(rhs);
00846 }
00847 inline ms_bool_t operator <(LPCWSTR lhs, const_CString_iadaptor const& rhs)
00848 {
00849     return CString(lhs) < rhs.get_CString();
00850 }
00851 inline ms_bool_t operator <(const_CString_iadaptor const& lhs, unsigned char const* rhs)
00852 {
00853     return lhs.get_CString() < CString(rhs);
00854 }
00855 inline ms_bool_t operator <(unsigned char const* lhs, const_CString_iadaptor const& rhs)
00856 {
00857     return CString(lhs) < rhs.get_CString();
00858 }
00859 
00860 
00861 
00862 inline ms_bool_t operator >(CString_cadaptor const& lhs, CString_cadaptor const& rhs)
00863 {
00864     return lhs.get_CString() > rhs.get_CString();
00865 }
00866 inline ms_bool_t operator >(CString_cadaptor const& lhs, CString const& rhs)
00867 {
00868     return lhs.get_CString() > rhs;
00869 }
00870 inline ms_bool_t operator >(CString const& lhs, CString_cadaptor const& rhs)
00871 {
00872     return lhs > rhs.get_CString();
00873 }
00874 inline ms_bool_t operator >(CString_cadaptor const& lhs, LPCSTR rhs)
00875 {
00876     return lhs.get_CString() > rhs;
00877 }
00878 inline ms_bool_t operator >(LPCSTR lhs, CString_cadaptor const& rhs)
00879 {
00880     return lhs > rhs.get_CString();
00881 }
00882 inline ms_bool_t operator >(CString_cadaptor const& lhs, LPCWSTR rhs)
00883 {
00884     return lhs.get_CString() > CString(rhs);
00885 }
00886 inline ms_bool_t operator >(LPCWSTR lhs, CString_cadaptor const& rhs)
00887 {
00888     return CString(lhs) > rhs.get_CString();
00889 }
00890 inline ms_bool_t operator >(CString_cadaptor const& lhs, unsigned char const* rhs)
00891 {
00892     return lhs.get_CString() > CString(rhs);
00893 }
00894 inline ms_bool_t operator >(unsigned char const* lhs, CString_cadaptor const& rhs)
00895 {
00896     return CString(lhs) > rhs.get_CString();
00897 }
00898 
00899 inline ms_bool_t operator >(CString_iadaptor const& lhs, CString_iadaptor const& rhs)
00900 {
00901     return lhs.get_CString() > rhs.get_CString();
00902 }
00903 inline ms_bool_t operator >(CString_iadaptor const& lhs, CString const& rhs)
00904 {
00905     return lhs.get_CString() > rhs;
00906 }
00907 inline ms_bool_t operator >(CString const& lhs, CString_iadaptor const& rhs)
00908 {
00909     return lhs > rhs.get_CString();
00910 }
00911 inline ms_bool_t operator >(CString_iadaptor const& lhs, LPCSTR rhs)
00912 {
00913     return lhs.get_CString() > rhs;
00914 }
00915 inline ms_bool_t operator >(LPCSTR lhs, CString_iadaptor const& rhs)
00916 {
00917     return lhs > rhs.get_CString();
00918 }
00919 inline ms_bool_t operator >(CString_iadaptor const& lhs, LPCWSTR rhs)
00920 {
00921     return lhs.get_CString() > CString(rhs);
00922 }
00923 inline ms_bool_t operator >(LPCWSTR lhs, CString_iadaptor const& rhs)
00924 {
00925     return CString(lhs) > rhs.get_CString();
00926 }
00927 inline ms_bool_t operator >(CString_iadaptor const& lhs, unsigned char const* rhs)
00928 {
00929     return lhs.get_CString() > CString(rhs);
00930 }
00931 inline ms_bool_t operator >(unsigned char const* lhs, CString_iadaptor const& rhs)
00932 {
00933     return CString(lhs) > rhs.get_CString();
00934 }
00935 
00936 inline ms_bool_t operator >(const_CString_iadaptor const& lhs, const_CString_iadaptor const& rhs)
00937 {
00938     return lhs.get_CString() > rhs.get_CString();
00939 }
00940 inline ms_bool_t operator >(const_CString_iadaptor const& lhs, CString const& rhs)
00941 {
00942     return lhs.get_CString() > rhs;
00943 }
00944 inline ms_bool_t operator >(CString const& lhs, const_CString_iadaptor const& rhs)
00945 {
00946     return lhs > rhs.get_CString();
00947 }
00948 inline ms_bool_t operator >(const_CString_iadaptor const& lhs, LPCSTR rhs)
00949 {
00950     return lhs.get_CString() > rhs;
00951 }
00952 inline ms_bool_t operator >(LPCSTR lhs, const_CString_iadaptor const& rhs)
00953 {
00954     return lhs > rhs.get_CString();
00955 }
00956 inline ms_bool_t operator >(const_CString_iadaptor const& lhs, LPCWSTR rhs)
00957 {
00958     return lhs.get_CString() > CString(rhs);
00959 }
00960 inline ms_bool_t operator >(LPCWSTR lhs, const_CString_iadaptor const& rhs)
00961 {
00962     return CString(lhs) > rhs.get_CString();
00963 }
00964 inline ms_bool_t operator >(const_CString_iadaptor const& lhs, unsigned char const* rhs)
00965 {
00966     return lhs.get_CString() > CString(rhs);
00967 }
00968 inline ms_bool_t operator >(unsigned char const* lhs, const_CString_iadaptor const& rhs)
00969 {
00970     return CString(lhs) > rhs.get_CString();
00971 }
00972 
00973 
00974 
00975 inline ms_bool_t operator <=(CString_cadaptor const& lhs, CString_cadaptor const& rhs)
00976 {
00977     return lhs.get_CString() <= rhs.get_CString();
00978 }
00979 inline ms_bool_t operator <=(CString_cadaptor const& lhs, CString const& rhs)
00980 {
00981     return lhs.get_CString() <= rhs;
00982 }
00983 inline ms_bool_t operator <=(CString const& lhs, CString_cadaptor const& rhs)
00984 {
00985     return lhs <= rhs.get_CString();
00986 }
00987 inline ms_bool_t operator <=(CString_cadaptor const& lhs, LPCSTR rhs)
00988 {
00989     return lhs.get_CString() <= rhs;
00990 }
00991 inline ms_bool_t operator <=(LPCSTR lhs, CString_cadaptor const& rhs)
00992 {
00993     return lhs <= rhs.get_CString();
00994 }
00995 inline ms_bool_t operator <=(CString_cadaptor const& lhs, LPCWSTR rhs)
00996 {
00997     return lhs.get_CString() <= CString(rhs);
00998 }
00999 inline ms_bool_t operator <=(LPCWSTR lhs, CString_cadaptor const& rhs)
01000 {
01001     return CString(lhs) <= rhs.get_CString();
01002 }
01003 inline ms_bool_t operator <=(CString_cadaptor const& lhs, unsigned char const* rhs)
01004 {
01005     return lhs.get_CString() <= CString(rhs);
01006 }
01007 inline ms_bool_t operator <=(unsigned char const* lhs, CString_cadaptor const& rhs)
01008 {
01009     return CString(lhs) <= rhs.get_CString();
01010 }
01011 
01012 inline ms_bool_t operator <=(CString_iadaptor const& lhs, CString_iadaptor const& rhs)
01013 {
01014     return lhs.get_CString() <= rhs.get_CString();
01015 }
01016 inline ms_bool_t operator <=(CString_iadaptor const& lhs, CString const& rhs)
01017 {
01018     return lhs.get_CString() <= rhs;
01019 }
01020 inline ms_bool_t operator <=(CString const& lhs, CString_iadaptor const& rhs)
01021 {
01022     return lhs <= rhs.get_CString();
01023 }
01024 inline ms_bool_t operator <=(CString_iadaptor const& lhs, LPCSTR rhs)
01025 {
01026     return lhs.get_CString() <= rhs;
01027 }
01028 inline ms_bool_t operator <=(LPCSTR lhs, CString_iadaptor const& rhs)
01029 {
01030     return lhs <= rhs.get_CString();
01031 }
01032 inline ms_bool_t operator <=(CString_iadaptor const& lhs, LPCWSTR rhs)
01033 {
01034     return lhs.get_CString() <= CString(rhs);
01035 }
01036 inline ms_bool_t operator <=(LPCWSTR lhs, CString_iadaptor const& rhs)
01037 {
01038     return CString(lhs) <= rhs.get_CString();
01039 }
01040 inline ms_bool_t operator <=(CString_iadaptor const& lhs, unsigned char const* rhs)
01041 {
01042     return lhs.get_CString() <= CString(rhs);
01043 }
01044 inline ms_bool_t operator <=(unsigned char const* lhs, CString_iadaptor const& rhs)
01045 {
01046     return CString(lhs) <= rhs.get_CString();
01047 }
01048 
01049 inline ms_bool_t operator <=(const_CString_iadaptor const& lhs, const_CString_iadaptor const& rhs)
01050 {
01051     return lhs.get_CString() <= rhs.get_CString();
01052 }
01053 inline ms_bool_t operator <=(const_CString_iadaptor const& lhs, CString const& rhs)
01054 {
01055     return lhs.get_CString() <= rhs;
01056 }
01057 inline ms_bool_t operator <=(CString const& lhs, const_CString_iadaptor const& rhs)
01058 {
01059     return lhs <= rhs.get_CString();
01060 }
01061 inline ms_bool_t operator <=(const_CString_iadaptor const& lhs, LPCSTR rhs)
01062 {
01063     return lhs.get_CString() <= rhs;
01064 }
01065 inline ms_bool_t operator <=(LPCSTR lhs, const_CString_iadaptor const& rhs)
01066 {
01067     return lhs <= rhs.get_CString();
01068 }
01069 inline ms_bool_t operator <=(const_CString_iadaptor const& lhs, LPCWSTR rhs)
01070 {
01071     return lhs.get_CString() <= CString(rhs);
01072 }
01073 inline ms_bool_t operator <=(LPCWSTR lhs, const_CString_iadaptor const& rhs)
01074 {
01075     return CString(lhs) <= rhs.get_CString();
01076 }
01077 inline ms_bool_t operator <=(const_CString_iadaptor const& lhs, unsigned char const* rhs)
01078 {
01079     return lhs.get_CString() <= CString(rhs);
01080 }
01081 inline ms_bool_t operator <=(unsigned char const* lhs, const_CString_iadaptor const& rhs)
01082 {
01083     return CString(lhs) <= rhs.get_CString();
01084 }
01085 
01086 
01087 
01088 inline ms_bool_t operator >=(CString_cadaptor const& lhs, CString_cadaptor const& rhs)
01089 {
01090     return lhs.get_CString() >= rhs.get_CString();
01091 }
01092 inline ms_bool_t operator >=(CString_cadaptor const& lhs, CString const& rhs)
01093 {
01094     return lhs.get_CString() >= rhs;
01095 }
01096 inline ms_bool_t operator >=(CString const& lhs, CString_cadaptor const& rhs)
01097 {
01098     return lhs >= rhs.get_CString();
01099 }
01100 inline ms_bool_t operator >=(CString_cadaptor const& lhs, LPCSTR rhs)
01101 {
01102     return lhs.get_CString() >= rhs;
01103 }
01104 inline ms_bool_t operator >=(LPCSTR lhs, CString_cadaptor const& rhs)
01105 {
01106     return lhs >= rhs.get_CString();
01107 }
01108 inline ms_bool_t operator >=(CString_cadaptor const& lhs, LPCWSTR rhs)
01109 {
01110     return lhs.get_CString() >= CString(rhs);
01111 }
01112 inline ms_bool_t operator >=(LPCWSTR lhs, CString_cadaptor const& rhs)
01113 {
01114     return CString(lhs) >= rhs.get_CString();
01115 }
01116 inline ms_bool_t operator >=(CString_cadaptor const& lhs, unsigned char const* rhs)
01117 {
01118     return lhs.get_CString() >= CString(rhs);
01119 }
01120 inline ms_bool_t operator >=(unsigned char const* lhs, CString_cadaptor const& rhs)
01121 {
01122     return CString(lhs) >= rhs.get_CString();
01123 }
01124 
01125 inline ms_bool_t operator >=(CString_iadaptor const& lhs, CString_iadaptor const& rhs)
01126 {
01127     return lhs.get_CString() >= rhs.get_CString();
01128 }
01129 inline ms_bool_t operator >=(CString_iadaptor const& lhs, CString const& rhs)
01130 {
01131     return lhs.get_CString() >= rhs;
01132 }
01133 inline ms_bool_t operator >=(CString const& lhs, CString_iadaptor const& rhs)
01134 {
01135     return lhs >= rhs.get_CString();
01136 }
01137 inline ms_bool_t operator >=(CString_iadaptor const& lhs, LPCSTR rhs)
01138 {
01139     return lhs.get_CString() >= rhs;
01140 }
01141 inline ms_bool_t operator >=(LPCSTR lhs, CString_iadaptor const& rhs)
01142 {
01143     return lhs >= rhs.get_CString();
01144 }
01145 inline ms_bool_t operator >=(CString_iadaptor const& lhs, LPCWSTR rhs)
01146 {
01147     return lhs.get_CString() >= CString(rhs);
01148 }
01149 inline ms_bool_t operator >=(LPCWSTR lhs, CString_iadaptor const& rhs)
01150 {
01151     return CString(lhs) >= rhs.get_CString();
01152 }
01153 inline ms_bool_t operator >=(CString_iadaptor const& lhs, unsigned char const* rhs)
01154 {
01155     return lhs.get_CString() >= CString(rhs);
01156 }
01157 inline ms_bool_t operator >=(unsigned char const* lhs, CString_iadaptor const& rhs)
01158 {
01159     return CString(lhs) >= rhs.get_CString();
01160 }
01161 
01162 inline ms_bool_t operator >=(const_CString_iadaptor const& lhs, const_CString_iadaptor const& rhs)
01163 {
01164     return lhs.get_CString() >= rhs.get_CString();
01165 }
01166 inline ms_bool_t operator >=(const_CString_iadaptor const& lhs, CString const& rhs)
01167 {
01168     return lhs.get_CString() >= rhs;
01169 }
01170 inline ms_bool_t operator >=(CString const& lhs, const_CString_iadaptor const& rhs)
01171 {
01172     return lhs >= rhs.get_CString();
01173 }
01174 inline ms_bool_t operator >=(const_CString_iadaptor const& lhs, LPCSTR rhs)
01175 {
01176     return lhs.get_CString() >= rhs;
01177 }
01178 inline ms_bool_t operator >=(LPCSTR lhs, const_CString_iadaptor const& rhs)
01179 {
01180     return lhs >= rhs.get_CString();
01181 }
01182 inline ms_bool_t operator >=(const_CString_iadaptor const& lhs, LPCWSTR rhs)
01183 {
01184     return lhs.get_CString() >= CString(rhs);
01185 }
01186 inline ms_bool_t operator >=(LPCWSTR lhs, const_CString_iadaptor const& rhs)
01187 {
01188     return CString(lhs) >= rhs.get_CString();
01189 }
01190 inline ms_bool_t operator >=(const_CString_iadaptor const& lhs, unsigned char const* rhs)
01191 {
01192     return lhs.get_CString() >= CString(rhs);
01193 }
01194 inline ms_bool_t operator >=(unsigned char const* lhs, const_CString_iadaptor const& rhs)
01195 {
01196     return CString(lhs) >= rhs.get_CString();
01197 }
01198 
01200 
01201 
01202 #ifndef _MFCSTL_NO_NAMESPACE
01203 # if defined(_STLSOFT_NO_NAMESPACE) || \
01204      defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
01205 } 
01206 # else
01207 } 
01208 # endif 
01209 #endif 
01210 
01213 STLSOFT_TEMPLATE_SPECIALISATION
01214 struct string_traits<mfcstl_ns_qual(CString_cadaptor)>
01215 {
01216     typedef mfcstl_ns_qual(CString_cadaptor)    value_type;
01217     typedef TCHAR                               char_type;
01218     typedef ss_size_t                           size_type;
01219     typedef char_type const                     const_char_type;
01220     typedef value_type                          string_type;
01221     typedef LPCSTR                              pointer;
01222     typedef LPCTSTR                             const_pointer;
01223     typedef LPCSTR                              iterator;
01224     typedef LPCTSTR                             const_iterator;
01225     typedef value_type::reverse_iterator        reverse_iterator;
01226     typedef value_type::const_reverse_iterator  const_reverse_iterator;
01227     enum
01228     {
01229             is_pointer          =   false
01230         ,   is_pointer_to_const =   false
01231         ,   char_type_size      =   sizeof(char_type)
01232     };
01233 
01234     static string_type empty_string()
01235     {
01236         return string_type();
01237     }
01238     static string_type construct(string_type const& src, size_type pos, size_type len)
01239     {
01240         return string_type(src, pos, len);
01241     }
01242     static string_type &assign_inplace(string_type &str, const_iterator first, const_iterator last)
01243     {
01244         return (str = string_type(first, last), str);
01245     }
01246 };
01247 
01248 #ifndef _MFCSTL_NO_NAMESPACE
01249 # if defined(_STLSOFT_NO_NAMESPACE) || \
01250      defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
01251 
01252 namespace mfcstl
01253 {
01254 # else
01255 namespace mfcstl_project
01256 {
01257 
01258 # endif 
01259 #endif 
01260 
01262 
01263 
01264 #ifdef STLSOFT_UNITTEST
01265 # include "./unittest/cstring_adaptors_unittest_.h"
01266 #endif 
01267 
01268 
01269 
01270 
01271 
01272 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
01273 
01274 
01275 
01276 template<ss_typename_param_k I>
01277 inline ss_typename_type_ret_k CString_adaptor_base<I>::allocator_type CString_adaptor_base<I>::get_allocator() const
01278 {
01279     return allocator_type();
01280 }
01281 
01282 template<ss_typename_param_k I>
01283 inline ss_typename_type_ret_k CString_adaptor_base<I>::class_type& CString_adaptor_base<I>::assign(LPCSTR s)
01284 {
01285     get_CString() = s;
01286 
01287     return *this;
01288 }
01289 template<ss_typename_param_k I>
01290 inline ss_typename_type_ret_k CString_adaptor_base<I>::class_type& CString_adaptor_base<I>::assign(LPCWSTR s)
01291 {
01292     get_CString() = s;
01293 
01294     return *this;
01295 }
01296 template<ss_typename_param_k I>
01297 inline ss_typename_type_ret_k CString_adaptor_base<I>::class_type& CString_adaptor_base<I>::assign(unsigned char const* s)
01298 {
01299     get_CString() = s;
01300 
01301     return *this;
01302 }
01303 template<ss_typename_param_k I>
01304 inline ss_typename_type_ret_k CString_adaptor_base<I>::class_type& CString_adaptor_base<I>::assign(LPCSTR s, size_type n)
01305 {
01306 #ifdef UNICODE
01307     get_CString() = CString(s).Left(n);
01308 #else 
01309     get_CString() = CString(s, n);
01310 #endif 
01311 
01312     return *this;
01313 }
01314 template<ss_typename_param_k I>
01315 inline ss_typename_type_ret_k CString_adaptor_base<I>::class_type& CString_adaptor_base<I>::assign(LPCWSTR s, size_type n)
01316 {
01317 #ifdef UNICODE
01318     get_CString() = CString(s, n);
01319 #else 
01320     get_CString() = CString(s).Left(n);
01321 #endif 
01322 
01323     return *this;
01324 }
01325 template<ss_typename_param_k I>
01326 inline ss_typename_type_ret_k CString_adaptor_base<I>::class_type& CString_adaptor_base<I>::assign(unsigned char const* s, size_type n)
01327 {
01328     get_CString() = CString(s).Left(n);
01329 
01330     return *this;
01331 }
01332 template<ss_typename_param_k I>
01333 inline ss_typename_type_ret_k CString_adaptor_base<I>::class_type& CString_adaptor_base<I>::assign(class_type const& s)
01334 {
01335     get_CString() = s.get_CString();
01336 
01337     return *this;
01338 }
01339 template<ss_typename_param_k I>
01340 inline ss_typename_type_ret_k CString_adaptor_base<I>::class_type& CString_adaptor_base<I>::assign(class_type const& s, size_type pos, size_type index)
01341 {
01342     MFCSTL_MESSAGE_ASSERT("invalid index", index + pos <= s.size());
01343 
01344     get_CString() = CString(s.c_str() + pos, index);
01345 
01346     return *this;
01347 }
01348 template<ss_typename_param_k I>
01349 inline ss_typename_type_ret_k CString_adaptor_base<I>::class_type& CString_adaptor_base<I>::assign(size_type n, value_type ch)
01350 {
01351     get_CString() = CString(ch, static_cast<int>(n));
01352 
01353     return *this;
01354 }
01355 
01356 template<ss_typename_param_k I>
01357 #if defined(STLSOFT_CF_STD_LIBRARY_DINKUMWARE_VC_VERSION) && \
01358     STLSOFT_CF_STD_LIBRARY_DINKUMWARE_VC_VERSION == STLSOFT_CF_DINKUMWARE_VC_VERSION_7_0
01359 inline ss_typename_type_ret_k CString_adaptor_base<I>::class_type& CString_adaptor_base<I>::assign(LPCTSTR first, LPCTSTR last)
01360 #else 
01361 inline ss_typename_type_ret_k CString_adaptor_base<I>::class_type& CString_adaptor_base<I>::assign(const_iterator first, const_iterator last)
01362 #endif 
01363 {
01364     get_CString() = CString(first, static_cast<int>(last - first));
01365 
01366     return *this;
01367 }
01368 
01369 template<ss_typename_param_k I>
01370 inline ss_typename_type_ret_k CString_adaptor_base<I>::iterator CString_adaptor_base<I>::begin()
01371 {
01372     return const_cast<pointer>(this->c_str());
01373 }
01374 template<ss_typename_param_k I>
01375 inline ss_typename_type_ret_k CString_adaptor_base<I>::iterator CString_adaptor_base<I>::end()
01376 {
01377     return this->begin() + this->size();
01378 }
01379 template<ss_typename_param_k I>
01380 inline ss_typename_type_ret_k CString_adaptor_base<I>::const_iterator CString_adaptor_base<I>::begin() const
01381 {
01382     return this->c_str();
01383 }
01384 template<ss_typename_param_k I>
01385 inline ss_typename_type_ret_k CString_adaptor_base<I>::const_iterator CString_adaptor_base<I>::end() const
01386 {
01387     return this->begin() + this->size();
01388 }
01389 
01390 #ifdef STLSOFT_LF_BIDIRECTIONAL_ITERATOR_SUPPORT
01391 template<ss_typename_param_k I>
01392 inline ss_typename_type_ret_k CString_adaptor_base<I>::reverse_iterator CString_adaptor_base<I>::rbegin()
01393 {
01394     return reverse_iterator(end());
01395 }
01396 template<ss_typename_param_k I>
01397 inline ss_typename_type_ret_k CString_adaptor_base<I>::reverse_iterator CString_adaptor_base<I>::rend()
01398 {
01399     return reverse_iterator(begin());
01400 }
01401 template<ss_typename_param_k I>
01402 inline ss_typename_type_ret_k CString_adaptor_base<I>::const_reverse_iterator  CString_adaptor_base<I>::rbegin() const
01403 {
01404     return const_reverse_iterator(end());
01405 }
01406 template<ss_typename_param_k I>
01407 inline ss_typename_type_ret_k CString_adaptor_base<I>::const_reverse_iterator CString_adaptor_base<I>::rend() const
01408 {
01409     return const_reverse_iterator(begin());
01410 }
01411 #endif 
01412 
01413 
01414 
01415 template<ss_typename_param_k I>
01416 inline ss_typename_type_ret_k CString_adaptor_base<I>::reference CString_adaptor_base<I>::subscript_(size_type index)
01417 {
01418     MFCSTL_MESSAGE_ASSERT("invalid index", index < size());
01419 
01420     return const_cast<pointer>(this->data())[index];
01421 }
01422 template<ss_typename_param_k I>
01423 inline ss_typename_type_ret_k CString_adaptor_base<I>::const_reference CString_adaptor_base<I>::subscript_(size_type index) const
01424 {
01425     MFCSTL_MESSAGE_ASSERT("invalid index", index < size());
01426 
01427     return this->data()[index];
01428 }
01429 template<ss_typename_param_k I>
01430 inline ss_typename_type_ret_k CString_adaptor_base<I>::reference CString_adaptor_base<I>::at(size_type index)
01431 {
01432     if(index >= size())
01433     {
01434         STLSOFT_THROW_X(mfcstl_ns_qual_std(out_of_range)("invalid index"));
01435     }
01436 
01437     return subscript_(index);
01438 }
01439 template<ss_typename_param_k I>
01440 inline ss_typename_type_ret_k CString_adaptor_base<I>::const_reference CString_adaptor_base<I>::at(size_type index) const
01441 {
01442     if(index >= size())
01443     {
01444         STLSOFT_THROW_X(mfcstl_ns_qual_std(out_of_range)("invalid index"));
01445     }
01446 
01447     return subscript_(index);
01448 }
01449 template<ss_typename_param_k I>
01450 inline ss_typename_type_ret_k CString_adaptor_base<I>::size_type CString_adaptor_base<I>::length() const
01451 {
01452     return get_CString().GetLength();
01453 }
01454 template<ss_typename_param_k I>
01455 inline ss_typename_type_ret_k CString_adaptor_base<I>::size_type CString_adaptor_base<I>::size() const
01456 {
01457     return this->length();
01458 }
01459 template<ss_typename_param_k I>
01460 inline ss_typename_type_ret_k CString_adaptor_base<I>::bool_type CString_adaptor_base<I>::empty() const
01461 {
01462     return 0 == this->length();
01463 }
01464 template<ss_typename_param_k I>
01465 inline ss_typename_type_ret_k CString_adaptor_base<I>::const_pointer CString_adaptor_base<I>::c_str() const
01466 {
01467 
01468     return get_CString();
01469 }
01470 template<ss_typename_param_k I>
01471 inline ss_typename_type_ret_k CString_adaptor_base<I>::const_pointer CString_adaptor_base<I>::data() const
01472 {
01473     return this->c_str();
01474 }
01475 
01476 
01477 
01478 
01479 inline CString_cadaptor::CString_cadaptor()
01480 {}
01481 inline CString_cadaptor::CString_cadaptor(class_type const& rhs)
01482     : CString(rhs)
01483 {}
01484 inline  CString_cadaptor::CString_cadaptor(CString const& rhs)
01485     : CString(rhs)
01486 {}
01487 inline  CString_cadaptor::CString_cadaptor(LPCSTR s)
01488     : CString(s)
01489 {}
01490 inline  CString_cadaptor::CString_cadaptor(LPCWSTR s)
01491     : CString(s)
01492 {}
01493 inline  CString_cadaptor::CString_cadaptor(unsigned char const* s)
01494     : CString(s)
01495 {}
01496 inline CString_cadaptor::CString_cadaptor(LPCTSTR from, LPCTSTR to)
01497     : CString(from, static_cast<int>(to - from))
01498 {}
01499 inline CString_cadaptor::CString_cadaptor(LPCTSTR from, size_type length)
01500     : CString(from, length)
01501 {}
01502 inline CString_cadaptor::CString_cadaptor(class_type const& str, size_type pos, size_type n)
01503     : CString(static_cast<LPCTSTR>(str) + pos, n)
01504 {}
01505 inline CString_cadaptor::CString_cadaptor(ms_size_t cch, TCHAR ch)
01506     : CString(ch, static_cast<int>(cch))
01507 {}
01508 inline CString_cadaptor::class_type const& CString_cadaptor::operator =(CString_cadaptor::class_type const& rhs)
01509 {
01510     assign(rhs);
01511 
01512     return *this;
01513 }
01514 inline CString_cadaptor::class_type const& CString_cadaptor::operator =(CString const& rhs)
01515 {
01516     assign(rhs);
01517 
01518     return *this;
01519 }
01520 inline CString_cadaptor::class_type const& CString_cadaptor::operator =(LPCSTR rhs)
01521 {
01522     assign(rhs);
01523 
01524     return *this;
01525 }
01526 inline CString_cadaptor::class_type const& CString_cadaptor::operator =(LPCWSTR rhs)
01527 {
01528     assign(rhs);
01529 
01530     return *this;
01531 }
01532 inline CString_cadaptor::class_type const& CString_cadaptor::operator =(unsigned char const* rhs)
01533 {
01534     assign(rhs);
01535 
01536     return *this;
01537 }
01538 
01539 
01540 
01541 
01542 inline CString_iadaptor::CString_iadaptor(CString &str)
01543     : m_str(&str)
01544 {}
01545 inline CString_iadaptor::CString_iadaptor(CString *str)
01546     : m_str(str)
01547 {}
01548 inline CString_iadaptor::class_type const& CString_iadaptor::operator =(CString_iadaptor::class_type const& rhs)
01549 {
01550     assign(rhs);
01551 
01552     return *this;
01553 }
01554 inline CString_iadaptor::class_type const& CString_iadaptor::operator =(CString const& rhs)
01555 {
01556     assign(rhs);
01557 
01558     return *this;
01559 }
01560 inline CString_iadaptor::class_type const& CString_iadaptor::operator =(LPCSTR rhs)
01561 {
01562     assign(rhs);
01563 
01564     return *this;
01565 }
01566 inline CString_iadaptor::class_type const& CString_iadaptor::operator =(LPCWSTR rhs)
01567 {
01568     assign(rhs);
01569 
01570     return *this;
01571 }
01572 inline CString_iadaptor::class_type const& CString_iadaptor::operator =(unsigned char const* rhs)
01573 {
01574     assign(rhs);
01575 
01576     return *this;
01577 }
01578 inline CString_iadaptor::reference CString_iadaptor::operator [](CString_iadaptor::size_type index)
01579 {
01580     return this->subscript_(index);
01581 }
01582 inline CString_iadaptor::const_reference CString_iadaptor::operator [](CString_iadaptor::size_type index) const
01583 {
01584     return this->subscript_(index);
01585 }
01586 
01587 
01588 
01589 
01590 inline const_CString_iadaptor::const_CString_iadaptor(CString const& str)
01591     : m_str(&str)
01592 {}
01593 inline const_CString_iadaptor::const_CString_iadaptor(CString const* str)
01594     : m_str(str)
01595 {}
01596 inline const_CString_iadaptor::const_reference const_CString_iadaptor::operator [](const_CString_iadaptor::size_type index) const
01597 {
01598     return this->subscript_(index);
01599 }
01600 
01601 #endif 
01602 
01603 
01604 
01605 #ifndef _MFCSTL_NO_NAMESPACE
01606 # if defined(_STLSOFT_NO_NAMESPACE) || \
01607      defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
01608 } 
01609 # else
01610 } 
01611 } 
01612 # endif 
01613 #endif 
01614 
01615 
01616 
01617 #endif 
01618 
01619