Main Page Modules Class Hierarchy Data Structures File List Data Fields Globals Related Pages

# Oscl_Linked_List_Base Class Reference
[OSCL Base]

`#include <oscl_linked_list.h>`

Inheritance diagram for Oscl_Linked_List_Base:

## Protected Methods
virtual | ~Oscl_Linked_List_Base ()
OSCL_IMPORT_REF void | construct (Oscl_Opaque_Type_Alloc_LL *op)
OSCL_IMPORT_REF void | destroy ()
OSCL_IMPORT_REF int32 | get_first (OsclAny *ele)
OSCL_IMPORT_REF int32 | get_next (OsclAny *ele)
OSCL_IMPORT_REF int32 | check_list ()
OSCL_IMPORT_REF int32 | add_element (const OsclAny *new_element)
OSCL_IMPORT_REF int32 | add_to_front (const OsclAny *new_element)
OSCL_IMPORT_REF int32 | insert_element (const OsclAny *new_element, int index)
OSCL_IMPORT_REF int32 | get_element (int32 index, OsclAny *element)
OSCL_IMPORT_REF int32 | remove_element (const OsclAny *data_to_remove)
OSCL_IMPORT_REF int32 | get_index (const OsclAny *data)
OSCL_IMPORT_REF int32 | remove_element (const int32 index_to_remove)
OSCL_IMPORT_REF int32 | move_to_end (const OsclAny *data_to_move)
OSCL_IMPORT_REF int32 | move_to_front (const OsclAny *data_to_move)
## Protected Attributes
OsclAny * | head
OsclAny * | tail
OsclAny * | iterator
int32 | num_elements
uint32 | sizeof_T

## Detailed Description

Oscl Linked List Base Class. A non-templated base class is used to avoid large inline functions in the Oscl_Linked_List implementation.

## Constructor & Destructor Documentation

virtual Oscl_Linked_List_Base::~Oscl_Linked_List_Base | ( |  | ) | `[inline, protected, virtual]`

## Member Function Documentation

OSCL_IMPORT_REF int32 Oscl_Linked_List_Base::add_element | ( | const OsclAny * | new_element | ) | `[protected]`

  | Adds new element to the list.if list is already there then it adds element at end of list otherwise it create the list and add the element as first element of list. Parameters:
  new_element | the element to be add in the list.
Returns: 32-bit integer on the success returns 1.

OSCL_IMPORT_REF int32 Oscl_Linked_List_Base::add_to_front | ( | const OsclAny * | new_element | ) | `[protected]`

  | Adds new element at the start of the list.if list is already exist then it adds element at start of list otherwise it create the list and add the element as first element of list. Parameters:
  new_element | the element to be add in the list.
Returns: 32-bit integer on the success returns 1.

OSCL_IMPORT_REF int32 Oscl_Linked_List_Base::check_list | ( |  | ) | `[protected]`

| Debug routine: Checks the list for elements. Returns: 32-bit integer, if node count is equal to number of node added to the list then returns 1 otherwise returns 0. Reimplemented in Oscl_Linked_List< LLClass, Alloc >.

OSCL_IMPORT_REF void Oscl_Linked_List_Base::construct | ( | Oscl_Opaque_Type_Alloc_LL * | op | ) | `[protected]`

OSCL_IMPORT_REF void Oscl_Linked_List_Base::destroy | ( |  | ) | `[protected]`

OSCL_IMPORT_REF int32 Oscl_Linked_List_Base::get_element | ( | int32 | index,
|  | OsclAny * | element
| ) | `[protected]`

  | Search and returs the element in the list for passed index. Parameters:
  index, element | The index is the count for the node.
Returns: 32-bit integer on success returns 1 otherwise returns 0.

OSCL_IMPORT_REF int32 Oscl_Linked_List_Base::get_first | ( | OsclAny * | ele | ) | `[protected]`

  | Return the first element of list in passed parameter, Parameters:
  ele | return the value of first element of list in this parameter
Returns: 32-bit interger,If first element found, it returns 1 otherwise it returns 0

OSCL_IMPORT_REF int32 Oscl_Linked_List_Base::get_index | ( | const OsclAny * | data | ) | `[protected]`

  | Returns the index for requested element. Parameters:
  data | the element for which index to be return.
Returns: 32-bit integer if data is found in the list it returns index otherwise it returns -1.

OSCL_IMPORT_REF int32 Oscl_Linked_List_Base::get_next | ( | OsclAny * | ele | ) | `[protected]`

  | Return the next element of list in passed parameter, Parameters:
  ele | return the value of next element of list in this parameter
Returns: 32-bit interger ,if next element is found in list,it returns 1 otherwise it returns 0

OSCL_IMPORT_REF int32 Oscl_Linked_List_Base::insert_element | ( | const OsclAny * | new_element,
|  | int | index
| ) | `[protected]`

  | Inserts new element in the list. If the index is past the end of the list it creates the list and add the element as first element of list. Parameters:
  new_element | the element to be add in the list.
Returns: 32-bit integer on the success returns 1.

OSCL_IMPORT_REF int32 Oscl_Linked_List_Base::move_to_end | ( | const OsclAny * | data_to_move | ) | `[protected]`

  | Moves the element to end of the list Parameters:
  data_to_move |
Returns: On success returns 1 otherwise returns 0.

OSCL_IMPORT_REF int32 Oscl_Linked_List_Base::move_to_front | ( | const OsclAny * | data_to_move | ) | `[protected]`

  | Moves the element to front of the list Parameters:
  data_to_move |
Returns: On success returns 1 otherwise returns 0.

OSCL_IMPORT_REF int32 Oscl_Linked_List_Base::remove_element | ( | const int32 | index_to_remove | ) | `[protected]`

  | Removes the element for requested index. Parameters:
  index_to_remove |
Returns: on success return 1 otherwise return 0. Reimplemented in Oscl_Linked_List< LLClass, Alloc >.

OSCL_IMPORT_REF int32 Oscl_Linked_List_Base::remove_element | ( | const OsclAny * | data_to_remove | ) | `[protected]`

  | Removes the element from the list. Parameters:
  data_to_remove |
Returns: 32-bit integer on if element fount in the list returns 1 otherwise returns 0.

## Field Documentation

OsclAny* Oscl_Linked_List_Base::head`[protected]`

OsclAny* Oscl_Linked_List_Base::iterator`[protected]`

int32 Oscl_Linked_List_Base::num_elements`[protected]`

uint32 Oscl_Linked_List_Base::sizeof_T`[protected]`

OsclAny* Oscl_Linked_List_Base::tail`[protected]`

The documentation for this class was generated from the following file:

- oscl_linked_list.h