|
CatapultServer
v0.5.0.1 (Elephant)
|
A container of weak_ptr<T> pointing to closable items. More...

Public Member Functions | |
| WeakContainer () | |
| Creates an empty container. More... | |
| WeakContainer (const consumer< T & > &close) | |
| Creates an empty container with a custom close function (close). More... | |
| size_t | size () const |
| Gets the number of items in the container and removes all previously deleted items. More... | |
| void | insert (const std::weak_ptr< T > &pEntry) |
| Adds pEntry to this container and removes all previously deleted items. More... | |
| void | clear () |
| Closes and removes all items in this container. More... | |
Private Member Functions | |
| void | pruneInternal () |
Private Attributes | |
| consumer< T & > | m_close |
| std::list< std::weak_ptr< T > > | m_entries |
| utils::SpinLock | m_lock |
A container of weak_ptr<T> pointing to closable items.
|
inline |
Creates an empty container.
|
inline |
Creates an empty container with a custom close function (close).
|
inline |
Closes and removes all items in this container.
|
inline |
Adds pEntry to this container and removes all previously deleted items.

|
inlineprivate |

|
inline |
Gets the number of items in the container and removes all previously deleted items.
|
private |
|
private |
|
mutableprivate |