CList_iadaptor Class Template Reference
[Collections Library]

#include <mfcstl/collections/clist_adaptors.hpp>

Inheritance diagram for CList_iadaptor:

CList_adaptor_base stl_collection_tag collection_tag

List of all members.


Detailed Description

template<typename A, typename T = CList_traits<A>>
class mfcstl::CList_iadaptor< A, T >

Adaptor class, representing an Instance Adaptor over the CList family of MFC containers.

It is used as follows:

  CStringList                          li;
  mfcstl::CList_iadaptor<CStringList>  lip(li);

  // As an MFC CStringList:
  li.AddHead("String 1");

  // As an STL container
  lip.push_back("String 2");
  std::list<CString>  l;
  l.push_back("String 3");
  l.push_back("String 4");
  lip.insert(lip.begin() + 2, l.begin(), l.end());
  std::sort(lip.begin(), lip.end());

Parameters:
A The list class, e.g. CObList, CList<long>, etc.
Note:
The elements in an adapted list are moved, during insertion / erasure, rather than copied. This means that if the elements in the container maintain pointers to their elements, or their peers, then they are not suitable for use.

Member Types

typedef
parent_class_type::list_type 
list_type
 The type of the underlying MFC list.
typedef
parent_class_type::value_type 
value_type
 The value type.
typedef
parent_class_type::allocator_type 
allocator_type
 The allocator type.
typedef
parent_class_type::reference 
reference
 The mutating (non-const) reference type.
typedef
parent_class_type::const_reference 
const_reference
 The non-mutating (const) reference type.
typedef parent_class_type::pointer pointer
 The mutating (non-const) pointer type.
typedef
parent_class_type::const_pointer 
const_pointer
 The non-mutating (const) pointer type.
typedef
parent_class_type::size_type 
size_type
 The size type.
typedef
parent_class_type::difference_type 
difference_type
 The difference type.
typedef CList_iadaptor< A, T > class_type
 The instantiation of the current type.

Public Member Functions

Construction
template<typename A2>
 CList_iadaptor (A2 &list)
template<typename A2>
 CList_iadaptor (A2 *pList)

Member Typedef Documentation

The type of the underlying MFC list.

Reimplemented from CList_adaptor_base.

The value type.

Reimplemented from CList_adaptor_base.

The allocator type.

Reimplemented from CList_adaptor_base.

The mutating (non-const) reference type.

Reimplemented from CList_adaptor_base.

The non-mutating (const) reference type.

Reimplemented from CList_adaptor_base.

The mutating (non-const) pointer type.

Reimplemented from CList_adaptor_base.

The non-mutating (const) pointer type.

Reimplemented from CList_adaptor_base.

The size type.

Reimplemented from CList_adaptor_base.

The difference type.

Reimplemented from CList_adaptor_base.

typedef CList_iadaptor<A, T> class_type

The instantiation of the current type.

Reimplemented from CList_adaptor_base.


The documentation for this class was generated from the following file:

Generated on Thu Jun 10 08:58:32 2010 for STLSoft by  doxygen 1.5.6