Skip to content

iox::cxx::ObjectPool🔗

More...

Public Classes🔗

Name
class Iterator

Public Types🔗

Name
using int Index_t

Public Functions🔗

Name
Iterator begin()
Iterator end()
ObjectPool()
~ObjectPool()
Index_t reserve()
Index_t construct()
template \<typename... Args>
Index_t
construct(Args &&... args)
Index_t add(const T & element)
void remove(Index_t index, bool destruct =false)
T & operator[](Index_t index)
Iterator iterator(Index_t index)
size_t size() const
size_t capacity() const
T * allocate()
T * create()
template \<typename... Args>
T *
create(Args &&... args)
void free(T * ptr, bool destruct)
void free(T * ptr)
T * insert(const T & element)
T * get(Index_t index)
T * get(T * ptr)
Iterator iterator(T * ptr)
Index_t pointerToIndex(T * ptr)
T * indexToPointer(Index_t index)

Public Attributes🔗

Name
constexpr int NO_INDEX

Detailed Description🔗

template <typename T ,
int CAPACITY =1>
class iox::cxx::ObjectPool;

Public Types Documentation🔗

using Index_t🔗

using iox::cxx::ObjectPool< T, CAPACITY >::Index_t =  int;

Public Functions Documentation🔗

function begin🔗

inline Iterator begin()

function end🔗

inline Iterator end()

function ObjectPool🔗

inline ObjectPool()

function ~ObjectPool🔗

inline ~ObjectPool()

function reserve🔗

inline Index_t reserve()

function construct🔗

inline Index_t construct()

function construct🔗

template <typename... Args>
inline Index_t construct(
    Args &&... args
)

function add🔗

inline Index_t add(
    const T & element
)

function remove🔗

inline void remove(
    Index_t index,
    bool destruct =false
)

function operator[]🔗

inline T & operator[](
    Index_t index
)

function iterator🔗

inline Iterator iterator(
    Index_t index
)

function size🔗

inline size_t size() const

function capacity🔗

inline size_t capacity() const

function allocate🔗

inline T * allocate()

function create🔗

inline T * create()

function create🔗

template <typename... Args>
inline T * create(
    Args &&... args
)

function free🔗

inline void free(
    T * ptr,
    bool destruct
)

function free🔗

inline void free(
    T * ptr
)

function insert🔗

inline T * insert(
    const T & element
)

function get🔗

inline T * get(
    Index_t index
)

function get🔗

inline T * get(
    T * ptr
)

function iterator🔗

inline Iterator iterator(
    T * ptr
)

function pointerToIndex🔗

inline Index_t pointerToIndex(
    T * ptr
)

todo: not critical, but refactor for pointer arithmetic later

function indexToPointer🔗

inline T * indexToPointer(
    Index_t index
)

Public Attributes Documentation🔗

variable NO_INDEX🔗

static constexpr int NO_INDEX = -1;

Updated on 17 June 2021 at 11:15:26 CEST