![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
#include "lib/scoped-ptrvect.hpp"
Simple vector based collection of pointers, managing lifecycle of the pointed-to objects.
Implemented as a non-copyable object, based on a vector of bare pointers.
Definition at line 67 of file scoped-ptrvect.hpp.
Public Types | |
| typedef size_t | size_type |
| typedef T | value_type |
| typedef T & | reference |
| typedef T const & | const_reference |
| using | iterator = IterType |
| using | const_iterator = ConstIterType |
Public Member Functions | |
| ~ScopedPtrVect () | |
| ScopedPtrVect () | |
| ScopedPtrVect (size_type capacity) | |
| ScopedPtrVect (ScopedPtrVect &&src) | |
| ScopedPtrVect & | operator= (ScopedPtrVect &&other) |
| T & | manage (T *obj) |
| take ownership of the given object, adding it at the end of the collection | |
| T * | detach (void *objAddress) |
| withdraw responsibility for a specific object. | |
| void | clear () |
| T & | operator[] (size_type i) |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| size_type | size () const |
| size_type | max_size () const |
| size_type | capacity () const |
| bool | empty () const |
Friends | |
| void | swap (ScopedPtrVect &left, ScopedPtrVect &right) |
Private Types | |
| using | _Vec = std::vector< T * > |
| using | VIter = _Vec::iterator |
| using | RIter = RangeIter< VIter > |
| using | IterType = PtrDerefIter< RIter > |
| using | ConstIterType = IterType::ConstIterType |
| using | RcIter = IterType::WrappedConstIterType |
Private Member Functions | |
| T * | get (size_type i) |
| RIter | allPtrs () |
| RIter | allPtrs () const |
Private Member Functions inherited from MoveAssign | |
| ~MoveAssign ()=default | |
| MoveAssign ()=default | |
| MoveAssign (MoveAssign &&)=default | |
| MoveAssign (MoveAssign const &)=delete | |
| MoveAssign & | operator= (MoveAssign &&)=default |
| MoveAssign & | operator= (MoveAssign const &)=delete |
Private Attributes | |
| _Vec | vec_ |
|
inline |
Definition at line 89 of file scoped-ptrvect.hpp.
References ScopedPtrVect< T >::clear().
Here is the call graph for this function:
|
inline |
Definition at line 94 of file scoped-ptrvect.hpp.
|
inlineexplicit |
Definition at line 99 of file scoped-ptrvect.hpp.
References ScopedPtrVect< T >::capacity(), and ScopedPtrVect< T >::vec_.
Here is the call graph for this function:
|
inline |
Definition at line 105 of file scoped-ptrvect.hpp.
|
private |
Definition at line 70 of file scoped-ptrvect.hpp.
|
private |
Definition at line 71 of file scoped-ptrvect.hpp.
Definition at line 73 of file scoped-ptrvect.hpp.
|
private |
Definition at line 74 of file scoped-ptrvect.hpp.
|
private |
Definition at line 76 of file scoped-ptrvect.hpp.
|
private |
Definition at line 77 of file scoped-ptrvect.hpp.
| typedef size_t size_type |
Definition at line 82 of file scoped-ptrvect.hpp.
| typedef T value_type |
Definition at line 83 of file scoped-ptrvect.hpp.
| typedef T& reference |
Definition at line 84 of file scoped-ptrvect.hpp.
| typedef T const& const_reference |
Definition at line 85 of file scoped-ptrvect.hpp.
Definition at line 191 of file scoped-ptrvect.hpp.
| using const_iterator = ConstIterType |
Definition at line 192 of file scoped-ptrvect.hpp.
|
inline |
Definition at line 116 of file scoped-ptrvect.hpp.
References ScopedPtrVect< T >::swap.
|
inline |
take ownership of the given object, adding it at the end of the collection
Definition at line 129 of file scoped-ptrvect.hpp.
References ScopedPtrVect< T >::vec_.
Referenced by DiagnosticOutputSlot::build(), and BlockPool::createBlock().
Here is the caller graph for this function:
|
inline |
withdraw responsibility for a specific object.
This object will be removed form this collection and returned as-is; it won't be deleted when the ScopedPtrVect goes out of scope.
| obj | address of the object in question. |
Definition at line 155 of file scoped-ptrvect.hpp.
References std::find(), and ScopedPtrVect< T >::vec_.
Referenced by BlockPool::transferResponsibility().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 170 of file scoped-ptrvect.hpp.
References ERROR_LOG_AND_IGNORE, and ScopedPtrVect< T >::vec_.
Referenced by ScopedPtrVect< T >::~ScopedPtrVect().
Here is the caller graph for this function:
|
inline |
Definition at line 186 of file scoped-ptrvect.hpp.
References ScopedPtrVect< T >::get().
Here is the call graph for this function:
|
inline |
Definition at line 194 of file scoped-ptrvect.hpp.
References ScopedPtrVect< T >::allPtrs().
Here is the call graph for this function:
|
inline |
Definition at line 195 of file scoped-ptrvect.hpp.
|
inline |
Definition at line 196 of file scoped-ptrvect.hpp.
References ScopedPtrVect< T >::allPtrs().
Here is the call graph for this function:
|
inline |
Definition at line 197 of file scoped-ptrvect.hpp.
|
inline |
Definition at line 204 of file scoped-ptrvect.hpp.
References ScopedPtrVect< T >::vec_.
Referenced by BlockPool::prepare_for(), and BlockPool::size().
Here is the caller graph for this function:
|
inline |
Definition at line 205 of file scoped-ptrvect.hpp.
References ScopedPtrVect< T >::vec_.
|
inline |
Definition at line 206 of file scoped-ptrvect.hpp.
References ScopedPtrVect< T >::vec_.
Referenced by ScopedPtrVect< T >::ScopedPtrVect().
Here is the caller graph for this function:
|
inline |
Definition at line 207 of file scoped-ptrvect.hpp.
References ScopedPtrVect< T >::vec_.
Referenced by BlockPool::isValid().
Here is the caller graph for this function:
|
inlineprivate |
element access, including range and null check
Definition at line 213 of file scoped-ptrvect.hpp.
References ScopedPtrVect< T >::vec_.
Referenced by WrappedStandardExeBuilder::invokeOriginalBuilder(), and ScopedPtrVect< T >::operator[]().
Here is the caller graph for this function:
|
inlineprivate |
access sequence of all managed pointers
Definition at line 224 of file scoped-ptrvect.hpp.
References ScopedPtrVect< T >::vec_.
Referenced by ScopedPtrVect< T >::begin(), and ScopedPtrVect< T >::begin().
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 229 of file scoped-ptrvect.hpp.
References lib::elements(), and util::unConst().
Here is the call graph for this function:
|
private |
Definition at line 79 of file scoped-ptrvect.hpp.
Referenced by ScopedPtrVect< T >::ScopedPtrVect(), ScopedPtrVect< T >::allPtrs(), ScopedPtrVect< T >::capacity(), ScopedPtrVect< T >::clear(), ScopedPtrVect< T >::detach(), ScopedPtrVect< T >::empty(), ScopedPtrVect< T >::get(), ScopedPtrVect< T >::manage(), ScopedPtrVect< T >::max_size(), and ScopedPtrVect< T >::size().
|
friend |
Definition at line 110 of file scoped-ptrvect.hpp.
Referenced by ScopedPtrVect< T >::operator=().
Inheritance diagram for ScopedPtrVect< T >:
Collaboration diagram for ScopedPtrVect< T >: