C++ Based OPC UA Client/Server SDK  1.5.5.355
HandleManager< T > Class Template Reference

HandleManager. More...

#include <opcuatypesinternal.h>

Public Member Functions

 HandleManager ()
 construction with Variable initialization. More...
 
virtual ~HandleManager ()
 destruction
 
void clearList ()
 Clears the formally created list. More...
 
void prepareAdd (OpcUa_UInt32 addCount)
 Prepares an array to add more items. More...
 
OpcUa_UInt32 add (T *pItem)
 Adds a new item to the array. More...
 
OpcUa_StatusCode addAt (OpcUa_UInt32 index, T *pItem)
 Adds a new item at a specific index to the array. More...
 
OpcUa_Boolean remove (OpcUa_UInt32 index)
 Removes and deletes the item with the passed handle and returns a boolean value indicating success. More...
 
OpcUa_Boolean detach (OpcUa_UInt32 index)
 Removes the item with the passed handle but does not delete the item. More...
 
T * get (OpcUa_UInt32 index)
 Get the specified item with the given index. More...
 
OpcUa_UInt32 itemCount ()
 Counts all available items. More...
 
OpcUa_UInt32 maxIndex ()
 Get the maximum Index. More...
 

Protected Member Functions

void resize (OpcUa_UInt32 length)
 Resizes the length of the array. More...
 

Detailed Description

template<class T>
class HandleManager< T >

HandleManager.

Constructor & Destructor Documentation

template<class T>
HandleManager< T >::HandleManager ( )
inline

construction with Variable initialization.

Member Function Documentation

template<class T>
OpcUa_UInt32 HandleManager< T >::add ( T *  pItem)
inline

Adds a new item to the array.

Returns invalid index 0 if the passed item is NULL

Parameters
pItemthe item to add.
Returns
the index where the new item is stored.
template<class T>
OpcUa_StatusCode HandleManager< T >::addAt ( OpcUa_UInt32  index,
T *  pItem 
)
inline

Adds a new item at a specific index to the array.

Parameters
indexThe index where the new item should be stored.
pItemThe item to add.
Returns
Success code.
template<class T>
void HandleManager< T >::clearList ( )
inline

Clears the formally created list.

template<class T>
OpcUa_Boolean HandleManager< T >::detach ( OpcUa_UInt32  index)
inline

Removes the item with the passed handle but does not delete the item.

Returns a boolean value indicating success.

Parameters
indexThe handle of the item to remove.
Returns
A flag indicating if the item was removed (true) or not found (false).
template<class T>
T* HandleManager< T >::get ( OpcUa_UInt32  index)
inline

Get the specified item with the given index.

Parameters
indexthe specified index where to get the item.
Returns
the specified item.
template<class T>
OpcUa_UInt32 HandleManager< T >::itemCount ( )
inline

Counts all available items.

Returns
the counted number of items.
template<class T>
OpcUa_UInt32 HandleManager< T >::maxIndex ( )
inline

Get the maximum Index.

Returns
the maximum index number.
template<class T>
void HandleManager< T >::prepareAdd ( OpcUa_UInt32  addCount)
inline

Prepares an array to add more items.

First of all the actual size will be calculated and after that the existing array will be expanded.

Parameters
addCountthe size for expanding the array.
template<class T>
OpcUa_Boolean HandleManager< T >::remove ( OpcUa_UInt32  index)
inline

Removes and deletes the item with the passed handle and returns a boolean value indicating success.

Parameters
indexThe handle of the item to remove.
Returns
A flag indicating if the item was removed (true) or not found (false).
template<class T>
void HandleManager< T >::resize ( OpcUa_UInt32  length)
inlineprotected

Resizes the length of the array.

Parameters
lengththe value of length for the resize.

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