...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Author: | Shunsuke Sogame |
---|---|
Contact: | mb2act@yahoo.co.jp |
Date: | 26th of May 2006 |
Copyright: | Shunsuke Sogame 2005-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt). |
Boost.Range MFC/ATL Extension provides Boost.Range support for MFC/ATL collection and string types.
CTypedPtrArray*> myArray; ... BOOST_FOREACH (CList *theList, myArray) { BOOST_FOREACH (CString& str, *theList) { boost::to_upper(str); std::sort(boost::begin(str), boost::end(str)); ... } }
If the
Range | Traversal Category | range_reference |
---|---|---|
CArray |
Random Access | T& |
CList |
Bidirectional | T& |
CMap |
Forward | Range::CPair& |
CTypedPtrArray | Random Access | T* const |
CTypedPtrList | Bidirectional | T* const |
CTypedPtrMap | Forward | std::pair |
CByteArray | Random Access | BYTE& |
CDWordArray | Random Access | DWORD& |
CObArray | Random Access | CObject* & |
CPtrArray | Random Access | void* & |
CStringArray | Random Access | CString& |
CUIntArray | Random Access | UINT& |
CWordArray | Random Access | WORD& |
CObList | Bidirectional | CObject* & |
CPtrList | Bidirectional | void* & |
CStringList | Bidirectional | CString& |
CMapPtrToWord | Forward | std::pair |
CMapPtrToPtr | Forward | std::pair |
CMapStringToOb | Forward | std::pair |
CMapStringToString | Forward | Range::CPair& |
CMapWordToOb | Forward | std::pair |
CMapWordToPtr | Forward | std::pair |
Other Boost.Range metafunctions are defined by the following.
Let Range be any type listed above and ReF be the same as range_reference
If the
Range | Traversal Category | range_reference |
---|---|---|
CAtlArray |
Random Access | E& |
CAutoPtrArray |
Random Access | E& |
CInterfaceArray | Random Access | CComQIPtr& |
CAtlList |
Bidirectional | E& |
CAutoPtrList |
Bidirectional | E& |
CHeapPtrList |
Bidirectional | E& |
CInterfaceList | Bidirectional | CComQIPtr& |
CAtlMap |
Forward | Range::CPair& |
CRBTree |
Bidirectional | Range::CPair& |
CRBMap |
Bidirectional | Range::CPair& |
CRBMultiMap |
Bidirectional | Range::CPair& |
CSimpleStringT | Random Access | B& |
CStringT | Random Access | B& |
CFixedStringT |
Random Access | range_reference |
CStringT | Random Access | B& |
CComBSTR | Random Access | OLECHAR& |
CSimpleArray |
Random Access | T& |
Other Boost.Range metafunctions are defined by the following.
Let Range be any type listed above and ReF be the same as range_reference
range_reference
if (Range is CObArray || Range is CObList) return CObject const * & else if (Range is CPtrArray || Range is CPtrList) return void const * & else if (there is a type X such that X& is the same as ReF) return X const & else if (there is a type X such that X* const is the same as ReF) return X const * const else return ReF
Other Boost.Range metafunctions are defined by the following.
range_value