ocean.util.container.pool.StructPool

Pool class template which stores struct instances, has the following features: * Get and recycle items. Recycled items will be re-used before creating new items. * The total number of items, as well as the number of idle or busy items in the pool can be queried. * A limit can be applied to the pool, which prevents more than the specified number of items from being created. * A specified number of items can be pre-allocated in the pool using the fill() method. * The entire pool can be emptied, returning all items to the idle state, with clear(). * Iteration over all items in the pool, or all busy or idle items. (See further notes in the super class.) * get() and fill() methods exist which automatically create new pool items, without requiring them to be passed via a lazy argument.

Also see: ocean.util.container.pool.model.IAggregatePool, for more detailed documentation and usage examples.

Members

Aliases

MyPool
alias MyPool = StructPool!(Struct)
Undocumented in source.

Classes

StructPool
class StructPool(T)

Manages a pool of struct instances of type T.

StructPoolTester
class StructPoolTester
Undocumented in source.

Structs

Struct
struct Struct
Undocumented in source.

Meta

License

Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).