eap_core_map_c Class Reference

class eap_core_map_c
A eap_core_map_c template class. The eap_core_map_c template class includes an array that is indexed with type of Selector_Type parameter. The Type could be any class that offers two functions with the following prototypes:
 void object_increase_reference_count();

 u32_t object_decrease_reference_count();
Public Member Functions
eap_core_map_c(abs_eap_am_tools_c *const , Abs_Type *const )
~eap_core_map_c()
eap_status_e add_handler(const Selector_Type *const , Type *const )
eap_status_e for_each(eap_status_e(*)(Type *const value, abs_eap_am_tools_c *const m_am_tools), const )
const eap_state_map_atom_c< Type, Selector_Type > *get_atom(const u32_t)
u32_t get_atom_count()
Type *constget_handler(const Selector_Type *const )
boolget_is_valid()
eap_status_e remove_handler(const Selector_Type *const , const bool)
eap_status_e reset()
Private Attributes
abs_eap_am_tools_c *constm_am_tools
eap_state_map_atom_c< Type, Selector_Type > *m_map
Abs_Type *constm_partner

Constructor & Destructor Documentation

eap_core_map_c(abs_eap_am_tools_c *const, Abs_Type *const)

eap_core_map_c(abs_eap_am_tools_c *const tools,
Abs_Type *const partner
)[inline]

The constructor initializes attributes using the passed parameters. Each pointer of m_map array is initialized null. abs_eap_am_tools_c.

Parameters

abs_eap_am_tools_c *const toolsis pointer to the tools class.
Abs_Type *const partneris back pointer to object which created this object.

~eap_core_map_c()

~eap_core_map_c()[inline, virtual]

The destructor of the eap_core_map template class deletes all stored objects.

Member Functions Documentation

add_handler(const Selector_Type *const, Type *const)

eap_status_e add_handler(const Selector_Type *const p_selector,
Type *const object
)[inline]

The add_handler() function stores a new type to the eap_core_map object.

Parameters

const Selector_Type *const p_selectoris pointer to a selector object. The p_selector object identifies the stored type.
Type *const object

for_each(eap_status_e(*)(Type *const value, abs_eap_am_tools_c *const m_am_tools), const)

eap_status_e for_each(eap_status_e(*)(Type *const value, abs_eap_am_tools_c *const m_am_tools)function,
const bool
)[inline]

The for_each() function runs function for the each object in the MAP.

Parameters

eap_status_e(*)(Type *const value, abs_eap_am_tools_c *const m_am_tools) function
const bool

get_atom(const u32_t)

const eap_state_map_atom_c< Type, Selector_Type > *get_atom(const u32_tindex)const [inline]

Parameters

const u32_t index

get_atom_count()

u32_t get_atom_count()const [inline]

get_handler(const Selector_Type *const)

Type *constget_handler(const Selector_Type *const p_selector)const [inline]

Parameters

const Selector_Type *const p_selectoris pointer to a selector object. The p_selector object identifies the required object.

get_is_valid()

boolget_is_valid()[inline]

remove_handler(const Selector_Type *const, const bool)

eap_status_e remove_handler(const Selector_Type *const p_selector,
const booldelete_object
)[inline]

The remove_handler() function removes and deletes the object from MAP.

Parameters

const Selector_Type *const p_selectoris pointer to a selector object.
const bool delete_objecttells whether the object is deleted (true) or not (false). The p_selector object identifies the removed object.

reset()

eap_status_e reset()[inline]

Member Data Documentation

abs_eap_am_tools_c *const m_am_tools

abs_eap_am_tools_c *constm_am_tools[private]

eap_state_map_atom_c< Type, Selector_Type > * m_map

eap_state_map_atom_c< Type, Selector_Type > *m_map[private]

This is hash-table to all objects stored to the eap_core_map object. Objects are stored using the eap_state_map_atom template class.

Abs_Type *const m_partner

Abs_Type *constm_partner[private]