Twain_DSM  1.0
Public Member Functions | Private Attributes | List of all members
CAppList Class Reference

Class CAppList implements dynamic array of APP_INFO. More...

Collaboration diagram for CAppList:
Collaboration graph
[legend]

Public Member Functions

 CAppList ()
 Default constructor allocates element 0. More...
 
 ~CAppList ()
 Default destructor frees allocated resources.
 
TWID_T size ()
 Get number of allocated App slots (Last valid App ID +1) More...
 
APP_INFOoperator[] (TWID_T AppId)
 Get reference to element of the array. More...
 
bool Erase (TWID_T AppId)
 Erase element from the array Unallocate memory if element is last one, else clear CurrentState. More...
 
bool Clear ()
 Erase all elements of the array. More...
 

Private Attributes

APP_INFOm_pList
 pointer to dynamicaly allocated array
 
TWID_T m_count
 number of elements of the array
 

Detailed Description

Class CAppList implements dynamic array of APP_INFO.

Definition at line 113 of file apps.cpp.

Constructor & Destructor Documentation

◆ CAppList()

CAppList::CAppList ( )
inline

Default constructor allocates element 0.

Real data starts from element 1, for backward compatibility

Definition at line 125 of file apps.cpp.

References m_count, and m_pList.

Member Function Documentation

◆ Clear()

bool CAppList::Clear ( )
inline

Erase all elements of the array.

Returns
true on success

Definition at line 216 of file apps.cpp.

References kLOG, kLOGERR, m_count, and m_pList.

◆ Erase()

bool CAppList::Erase ( TWID_T  AppId)
inline

Erase element from the array Unallocate memory if element is last one, else clear CurrentState.

Parameters
[in]AppIdis Application ID/array element index
Returns
true on success

Definition at line 179 of file apps.cpp.

◆ operator[]()

APP_INFO& CAppList::operator[] ( TWID_T  AppId)
inline

Get reference to element of the array.

Allocate memory if the element does not exist.

Parameters
[in]AppIdis Application ID/array element index
Returns
reference to the array element

Definition at line 155 of file apps.cpp.

◆ size()

TWID_T CAppList::size ( )
inline

Get number of allocated App slots (Last valid App ID +1)

Returns
number of allocated App slots (Last valid App ID +1)

Definition at line 147 of file apps.cpp.


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