MGCL V10
V10
MGCL V10
|
Defines List of newed object pointers. [詳解]
公開型 | |
typedef std::list< T * >::iterator | iterator |
typedef std::list< T * > ::const_iterator | const_iterator |
typedef std::list< T * > ::reverse_iterator | reverse_iterator |
typedef std::list< T * > ::const_reverse_iterator | const_reverse_iterator |
typedef std::list< T * >::reference | reference |
typedef std::list< T * > ::const_reference | const_reference |
typedef std::list< T * >::size_type | size_type |
公開メンバ関数 | |
MGPlist () | |
Constructors. [詳解] | |
MGPlist (const MGPlist< T > &rhs) | |
MGPlist (size_type n) | |
Create a list whose size is n. [詳解] | |
template<class InputIter > | |
MGPlist (InputIter first, InputIter last) | |
Create a list with a range. The ownership will be transfered. [詳解] | |
~MGPlist () | |
Destroy the object and delete all pointers that this holds. [詳解] | |
MGPlist< T > & | operator= (const MGPlist< T > &rhs) |
operator overload [詳解] | |
template<class InputIter > | |
void | assign (InputIter first, InputIter last) |
member functions [詳解] | |
const_reference | back () const |
reference | back () |
const_iterator | begin () const |
Return const_iterator at the beginning of list. [詳解] | |
iterator | begin () |
void | clear () |
clear list, that is, erase all the elements in the list. [詳解] | |
bool | empty () const |
const_iterator | end () const |
Return const_iterator at the end of list. [詳解] | |
iterator | end () |
iterator | erase (iterator x) |
erase element x. [詳解] | |
iterator | erase (iterator first, iterator last) |
erase sequence [first, last). [詳解] | |
const_iterator | find (T *obj) const |
iterator | find (T *obj) |
const_reference | front () const |
reference | front () |
iterator | insert (iterator it, T *x) |
template<class InputIter > | |
void | insert (iterator pos, InputIter first, InputIter last) |
Insert given range denoted by [first, last) into one before pos. [詳解] | |
size_type | max_size () const |
Returns the size of maximum size. [詳解] | |
void | merge (MGPlist< T > &rhs) |
Equivalent to call std::list::merge(). [詳解] | |
void | pop_back () |
pop last element. [詳解] | |
void | pop_front () |
pop first element. [詳解] | |
void | push_back (T *x) |
push element x at the end. [詳解] | |
void | push_back (MGPlist< T > &x) |
void | push_front (T *x) |
push element x at the first. [詳解] | |
const_reverse_iterator | rbegin () const |
Return const_reverse_iterator at the beginning of list. [詳解] | |
reverse_iterator | rbegin () |
const_reverse_iterator | rend () const |
Return const_reverse_iterator at the end of list. [詳解] | |
reverse_iterator | rend () |
iterator | release (iterator i) |
void | remove (T *x) |
Release the ownership of elements that point the same as x. [詳解] | |
template<class Pred > | |
void | remove_if (Pred pred) |
T * | removeAt (iterator x) |
void | reverse () |
reverse sequence. [詳解] | |
size_type | size () const |
Return the number of items that are in the list. [詳解] | |
void | sort () |
Equivalent to call std::list::sort(). [詳解] | |
template<class Traits > | |
void | sort (Traits _Comp) |
void | splice (iterator pos, MGPlist< T > &ls) |
void | splice (iterator pos, MGPlist< T > &ls, iterator i) |
void | splice (iterator pos, MGPlist< T > &ls, iterator first, iterator last) |
void | swap (MGPlist< T > &x) |
Equivalent to call std::list::swap(). [詳解] | |
void | unique () |
Equivalent to call std::list::unique(). [詳解] | |
公開変数類 | |
std::list< T * > | m_list |
Member Data. [詳解] | |
フレンド | |
MG_DLL_DECLR friend std::ostream & | operator<< (std::ostream &out, const MGPlist< T > &lst) |
String stream function. [詳解] | |
Defines List of newed object pointers.
MGPlist is a list of std::auto_ptr<class T>. The member pointers of newed objects will be destructed when MGPlist object is destructed. That is, the ownerships of the members all of the ownerships will be transfered to the copied or assigned new MGPlist.
typedef std::list<T*>::const_iterator MGPlist< T >::const_iterator |
typedef std::list<T*>::const_reference MGPlist< T >::const_reference |
typedef std::list<T*>::const_reverse_iterator MGPlist< T >::const_reverse_iterator |
typedef std::list<T*>::reverse_iterator MGPlist< T >::reverse_iterator |
The copy constructor. The argument rhs will be cleared, since the ownership of all data of rhs should be transfered to this object. 所有権はすべて、新しいオブジェクトに移るので rhsのすべての要素はNULLになります。(sizeは 0となります)
Create a list whose size is n.
|
inline |
Create a list with a range. The ownership will be transfered.
|
inline |
member functions
Assignment that takes a range. The intersection of this object and [first, last) must be empty.
|
inline |
Return(but does not remove) last element in the list. If list is empty, behavior is undefined.
|
inline |
Return const_iterator at the beginning of list.
|
inline |
clear list, that is, erase all the elements in the list.
|
inline |
Return true if there are no items in the list, false otherwise.
|
inline |
Return const_iterator at the end of list.
erase sequence [first, last).
|
inline |
find the position of the object T* found first. If not found, end() will be returned.
|
inline |
Return(but does not remove) first element in the list. If list is empty, behavior is undefined.
insert an element x before the position it. Function's return value is the iterator of x after inserted.
|
inline |
Insert given range denoted by [first, last) into one before pos.
Returns the size of maximum size.
Equivalent to call std::list::merge().
|
inline |
pop last element.
|
inline |
pop first element.
|
inline |
push element x at the end.
|
inline |
push element x at the first.
|
inline |
Return const_reverse_iterator at the beginning of list.
|
inline |
Release the pointer at th position i. Returned will be the position after the released gel.
|
inline |
Release the ownership of elements that point the same as x.
Release the ownership of elements that pred(x) is true, where x is an element of the list.
Remove the T* at the iterator x and return the T*. If x is no valid, behavior is undefined. 現在の所有権を放棄し、ただのポインタを返す。
|
inline |
Return const_reverse_iterator at the end of list.
|
inline |
|
inline |
reverse sequence.
Return the number of items that are in the list.
|
inline |
Equivalent to call std::list::sort().
|
inline |
Equivalent to call std::list::swap().
|
inline |
Equivalent to call std::list::unique().
|
friend |
String stream function.
std::list<T*> MGPlist< T >::m_list |
Member Data.