#include <Repository.h>
Public Types | |
| typedef T * | value_type |
| typedef size_t | size_type |
| typedef std::vector< value_type > | list_t |
| typedef std::vector< value_type >::iterator | iterator |
| typedef std::vector< value_type >::const_iterator | const_iterator |
Public Member Functions | |
| Repository () | |
| Constructor. | |
| virtual | ~Repository () |
| Destructor. | |
| iterator | begin () |
| Get iterator to the first element of the repository. | |
| const_iterator | begin () const |
| Get constant iterator to the first element of the repository. | |
| iterator | end () |
| Get iterator to the end of the repository. | |
| const_iterator | end () const |
| Get constant iterator to the end of the repository. | |
| bool | empty () const |
| Return true if repository is empty. | |
| size_type | size () const |
| Return number of elements in the repository. | |
| void | push_back (const value_type &x_) |
| Add new element to the repository. | |
| void | erase (iterator position_) |
| Remove element at the position_ iterator. | |
| bool | erase (const value_type &x_) |
| Remove element. | |
| void | clear () |
| Empty repository. | |
Private Attributes | |
| list_t * | m_collection |
Definition at line 33 of file Repository.h.
|
|||||
|
Definition at line 41 of file Repository.h. |
|
|||||
|
Definition at line 40 of file Repository.h. |
|
|||||
|
Definition at line 39 of file Repository.h. |
|
|||||
|
Definition at line 37 of file Repository.h. |
|
|||||
|
Definition at line 36 of file Repository.h. |
|
|||||||||
|
Constructor.
Definition at line 45 of file Repository.h. References ASSA::Repository< T >::m_collection. 00045 { 00046 m_collection = new list_t; 00047 }
|
|
|||||||||
|
Destructor.
Definition at line 50 of file Repository.h. References ASSA::Repository< T >::clear(), and ASSA::Repository< T >::m_collection. 00050 { 00051 if (m_collection) { clear (); delete m_collection; } 00052 }
|
|
|||||||||
|
Get constant iterator to the first element of the repository.
Definition at line 58 of file Repository.h. References ASSA::Repository< T >::m_collection. 00058 { return m_collection->begin (); }
|
|
|||||||||
|
Get iterator to the first element of the repository.
Definition at line 55 of file Repository.h. References ASSA::Repository< T >::m_collection. Referenced by ASSA::Repository< T >::erase(). 00055 { return m_collection->begin (); }
|
|
|||||||||
|
Empty repository.
Definition at line 90 of file Repository.h. References ASSA::Repository< T >::m_collection. Referenced by ASSA::Repository< T >::~Repository(). 00090 { 00091 m_collection->erase (m_collection->begin (), m_collection->end ()); 00092 }
|
|
|||||||||
|
Return true if repository is empty.
Definition at line 67 of file Repository.h. References ASSA::Repository< T >::m_collection. 00067 { return m_collection->empty (); }
|
|
|||||||||
|
Get constant iterator to the end of the repository.
Definition at line 64 of file Repository.h. References ASSA::Repository< T >::m_collection. 00064 { return m_collection->end (); }
|
|
|||||||||
|
Get iterator to the end of the repository.
Definition at line 61 of file Repository.h. References ASSA::Repository< T >::m_collection. Referenced by ASSA::Repository< T >::erase(). 00061 { return m_collection->end (); }
|
|
||||||||||
|
Remove element.
Definition at line 81 of file Repository.h. References ASSA::Repository< T >::begin(), ASSA::Repository< T >::end(), and ASSA::Repository< T >::erase(). 00081 { 00082 iterator it = begin (); 00083 while (it != end ()) { 00084 if ((*it) == x_) { erase (it); break; } 00085 it++; 00086 } 00087 }
|
|
||||||||||
|
Remove element at the position_ iterator.
Definition at line 76 of file Repository.h. References ASSA::Repository< T >::m_collection. Referenced by ASSA::Repository< T >::erase(). 00076 { m_collection->erase (position_); }
|
|
||||||||||
|
Add new element to the repository.
Definition at line 73 of file Repository.h. References ASSA::Repository< T >::m_collection. 00073 { m_collection->push_back (x_); }
|
|
|||||||||
|
Return number of elements in the repository.
Definition at line 70 of file Repository.h. References ASSA::Repository< T >::m_collection. 00070 { return m_collection->size (); }
|
|
|||||
1.4.6