#include <list2.h>


Public Member Functions | |
| virtual void | limit (size_type _Limit) | 
| pair< size_type, bool > | position (const _Ty &_Val) const | 
| bool | contains (const _Ty &_Val) const | 
| bool | contains_no (const _Ty &_Val) const | 
| virtual bool | add_if_new (const _Ty &_Val) | 
| operator bool () | |
| reference | at (size_type _Off) | 
| const_reference | at (size_type _Off) const | 
| reference | operator[] (size_type _Off) | 
| const_reference | operator[] (size_type _Off) const | 
Static Public Member Functions | |
| static list2< _Ty, _Alloc > __cdecl | dyn_create (size_type _Count,...) | 
Protected Member Functions | |
| void | _Xran () const | 
Related Functions | |
| (Note that these are not member functions.)  | |
| template<class _Ty_a, class _Alloc_a, class _Ty_b, class _Alloc_b> | |
| list2< _Ty_a, _Alloc_a > & | operator+= (list2< _Ty_a, _Alloc_a > &container, const list< _Ty_b, _Alloc_b > &values) | 
| template<class _Ty_a, class _Alloc_a, class _Ty_b, class _Alloc_b> | |
| list2< _Ty_a, _Alloc_a > & | operator<< (list2< _Ty_a, _Alloc_a > &container, const list< _Ty_b, _Alloc_b > &values) | 
This specialisation supports:
| _Ty | element/value type | |
| _Alloc | element/value allocator | 
Definition at line 70 of file list2.h.
| virtual void std::list2< _Ty, _Alloc >::limit | ( | size_type | _Limit | ) |  [inline, virtual] | 
        
| pair<size_type, bool> std::list2< _Ty, _Alloc >::position | ( | const _Ty & | _Val | ) |  const [inline] | 
        
Brute force evaluation of element index in container. -1 is returned if element is not contained.
| _Val | element to search for | 
Definition at line 98 of file list2.h.
00101 { 00102 size_type _Index = 0; 00103 for (const_iterator iter = begin(); iter != end(); ++iter, ++_Index) 00104 { 00105 if (*iter == _Val) 00106 { 00107 return pair<size_type, bool>(_Index, true); 00108 } 00109 } 00110 return pair<size_type, bool>(-1, false); 00111 }
| bool std::list2< _Ty, _Alloc >::contains | ( | const _Ty & | _Val | ) |  const [inline] | 
        
Brute force test to check whether or not a specific value is contained in the vector.
| _Val | element to check for | 
Definition at line 119 of file list2.h.
Referenced by std::list2< _Ty, _Alloc >::add_if_new().
| bool std::list2< _Ty, _Alloc >::contains_no | ( | const _Ty & | _Val | ) |  const [inline] | 
        
Brute force test to check whether or not a specific value is contained in the vector. The inverted result is returned this can be used for map2 values(check_fun_t) to return a unique list.
| _Val | element to check for | 
Definition at line 133 of file list2.h.
| virtual bool std::list2< _Ty, _Alloc >::add_if_new | ( | const _Ty & | _Val | ) |  [inline, virtual] | 
        
Add _Val if it is not already contained in the list Returns wether or not _Val was added
| _Val | element to add | 
Definition at line 146 of file list2.h.
References std::list2< _Ty, _Alloc >::contains().
00149 { 00150 if (!contains(_Val)) 00151 { 00152 push_back(_Val); 00153 return true; 00154 } 00155 return false; 00156 }

| std::list2< _Ty, _Alloc >::operator bool | ( | ) |  [inline] | 
        
| reference std::list2< _Ty, _Alloc >::at | ( | size_type | _Off | ) |  [inline] | 
        
dereference operator
| _Off | offset/index of element to dereference | 
Definition at line 171 of file list2.h.
References std::list2< _Ty, _Alloc >::_Xran().
Referenced by std::list2< _Ty, _Alloc >::operator[]().
00174 { // subscript mutable sequence with checking 00175 if (size() <= _Off) 00176 { 00177 _Xran(); 00178 } 00179 iterator it = begin(); 00180 while(_Off--) ++it; 00181 return *it; 00182 }

| const_reference std::list2< _Ty, _Alloc >::at | ( | size_type | _Off | ) |  const [inline] | 
        
dereference operator
| _Off | offset/index of element to dereference | 
Definition at line 188 of file list2.h.
References std::list2< _Ty, _Alloc >::_Xran().
00191 { // subscript non mutable sequence with checking 00192 if (size() <= _Off) 00193 { 00194 _Xran(); 00195 } 00196 const_iterator it = begin(); 00197 while(_Off--) ++it; 00198 return *it; 00199 }

| reference std::list2< _Ty, _Alloc >::operator[] | ( | size_type | _Off | ) |  [inline] | 
        
dereference operator
| _Off | offset/index of element to dereference | 
Definition at line 205 of file list2.h.
References std::list2< _Ty, _Alloc >::at().
00208 { // subscript mutable sequence 00209 return at(_Off); 00210 }

| const_reference std::list2< _Ty, _Alloc >::operator[] | ( | size_type | _Off | ) |  const [inline] | 
        
dereference operator
| _Off | offset/index of element to dereference | 
Definition at line 216 of file list2.h.
References std::list2< _Ty, _Alloc >::at().
00219 { // subscript nonmutable sequence 00220 return at(_Off); 00221 }

| static list2<_Ty, _Alloc> __cdecl std::list2< _Ty, _Alloc >::dyn_create | ( | size_type | _Count, | |
| ... | ||||
| ) |  [inline, static] | 
        
Dynamic list creation.
| _Count | number of elemnts to put into list2 | |
| ... | elements to put into the vector each of type _Ty (_Count times) | 
Definition at line 228 of file list2.h.
00232 { 00233 _Myt _List; 00234 va_list _Args; 00235 00236 va_start(_Args, _Count); 00237 while(_Count--) 00238 { 00239 _List.push_back(va_arg(_Args, const _Ty)); 00240 } 00241 va_end(_Args); 00242 return _List; 00243 }
| void std::list2< _Ty, _Alloc >::_Xran | ( | ) |  const [inline, protected] | 
        
throw an out of range exception
Definition at line 249 of file list2.h.
Referenced by std::list2< _Ty, _Alloc >::at().
00250 { // report an out_of_range error 00251 _THROW(out_of_range, "invalid list2<T> subscript"); 00252 }
| list2< _Ty_a, _Alloc_a > & operator+= | ( | list2< _Ty_a, _Alloc_a > & | container, | |
| const list< _Ty_b, _Alloc_b > & | values | |||
| ) |  [related] | 
        
add (not store) the values of a container to another container
_Ty_b to _Ty_a exists | _Ty_a | element/value type of receiver container | |
| _Alloc_a | element/value allocator of receiver container | |
| _Ty_b | element/value type of input container | |
| _Alloc_b | element/value allocator of input container | |
| container | container that receives th e input values | |
| values | container input values | 
Definition at line 274 of file list2.h.
00278 { 00279 // NO clear 00280 for (list2<_Ty_b, _Alloc_b>::const_iterator it = values.begin(); it != values.end(); ++it) 00281 { 00282 container.push_back((_Ty_a)*it); 00283 } 00284 return container; 00285 };
| list2< _Ty_a, _Alloc_a > & operator<< | ( | list2< _Ty_a, _Alloc_a > & | container, | |
| const list< _Ty_b, _Alloc_b > & | values | |||
| ) |  [related] | 
        
store (not add) the values of a container to another containert
_Ty_b to _Ty_a exists | _Ty_a | element/value type of receiver container | |
| _Alloc_a | element/value allocator of receiver container | |
| _Ty_b | element/value type of input container | |
| _Alloc_b | element/value allocator of input container | |
| container | container that receives th e input values | |
| values | container input values | 
Definition at line 305 of file list2.h.
| Hosted on code.google.com | © Marcus Börger | Generated on Fri Jan 18 21:21:15 2008 for MBO-lib by   1.5.4 |