eap_array_c Class Reference

class eap_array_c

The eap_array_c template class includes an array for type of Type objects. The objects can be added, retrieved and their count can be queried.

Public Member Functions
eap_array_c(abs_eap_am_tools_c *const )
~eap_array_c()
eap_status_e add_object(Type *const , const bool)
eap_status_e add_object_to_begin(Type *const , const bool)
Type *constget_last_object()
Type *constget_object(const u32_t)
const u32_tget_object_count()
eap_array_c< Type > &operator=(const eap_array_c< Type > &)
eap_status_e remove_object(const u32_t)
eap_status_e reset()
Private Attributes
abs_eap_am_tools_c *m_am_tools
eap_array_atom_c< Type > *m_head
u32_t m_object_count
eap_array_atom_c< Type > *m_tail

Constructor & Destructor Documentation

eap_array_c(abs_eap_am_tools_c *const)

eap_array_c(abs_eap_am_tools_c *const tools)[inline]

The constructor initializes attributes using the passed parameter. abs_eap_am_tools_c.

Parameters

abs_eap_am_tools_c *const toolsis pointer to the tools class.

~eap_array_c()

~eap_array_c()[inline, virtual]

Destructor deletes all atoms.

Member Functions Documentation

add_object(Type *const, const bool)

eap_status_e add_object(Type *const object,
const boolm_free_object
)[inline]

The function add_object() adds one new object to the array.

Parameters

Type *const objectis pointer to the added object
const bool m_free_objectis flag that indicates whether the object should be deleted by eap_array_c

add_object_to_begin(Type *const, const bool)

eap_status_e add_object_to_begin(Type *const object,
const boolm_free_object
)[inline]

The function add_object_to_begin() adds one new object to the begin of the array.

Parameters

Type *const objectis pointer to the added object
const bool m_free_objectis flag that indicates whether the object should be deleted by eap_array_c

get_last_object()

Type *constget_last_object()const [inline]

Gets last object.

get_object(const u32_t)

Type *constget_object(const u32_tindex)const [inline]

The get_object() function returns object based on the index given.

Parameters

const u32_t indexIndicates which object pointer is returned

get_object_count()

const u32_tget_object_count()const [inline]

The get_object_count() function returns the number of objects in the array.

operator=(const eap_array_c< Type > &)

eap_array_c< Type > &operator=(const eap_array_c< Type > &right_type_value)

Parameters

const eap_array_c< Type > & right_type_value

remove_object(const u32_t)

eap_status_e remove_object(const u32_tindex)[inline]

The remove_object() function removes object based on the index given.

Parameters

const u32_t indexIndicates which object pointer is returned

reset()

eap_status_e reset()[inline]

reset() deletes all atoms.

Member Data Documentation

abs_eap_am_tools_c * m_am_tools

abs_eap_am_tools_c *m_am_tools[private]

eap_array_atom_c< Type > * m_head

eap_array_atom_c< Type > *m_head[private]

u32_t m_object_count

u32_t m_object_count[private]

eap_array_atom_c< Type > * m_tail

eap_array_atom_c< Type > *m_tail[private]