GlobalObjects
Loading...
Searching...
No Matches
ptl::ATDVList Class Referenceabstract

Abstract superclass for template lists that include a pointer to objects or objects as copies in the list. More...

#include <PtlATDVList.h>

Inheritance diagram for ptl::ATDVList:

Public Member Functions

 ATDVList (ListMode eMode=DEFAULT)
 
virtual ~ATDVList ()
 
int currentElementCache (ElementCache eWhich)
 
int getErrorCode ()
 
virtual ListMode getListMode ()=0
 
std::size_t getSize ()
 
VDVListgetVDVList ()
 

Protected Attributes

VDVListm_VDVListe
 

Private Member Functions

 ATDVList (const ATDVList &)
 

Detailed Description

Abstract superclass for template lists that include a pointer to objects or objects as copies in the list.

Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ ATDVList() [1/2]

ptl::ATDVList::ATDVList ( ListMode eMode = DEFAULT)

Constructor with optional parameter passing. List is empty at first. With the parameter eMode you can instantiate a list, which includes data objects several times (no parameter or DEFAULT) or only once (UNIQUE) and/or should be the owner of the data objects (RESPONSIBLE).

◆ ~ATDVList()

virtual ptl::ATDVList::~ATDVList ( )
virtual

Destructor, emptying list.

◆ ATDVList() [2/2]

ptl::ATDVList::ATDVList ( const ATDVList & )
private

Copy constructor is not available. This is to prevent a programmer from passing an object from this class to a function, for example, by value.

Member Function Documentation

◆ currentElementCache()

int ptl::ATDVList::currentElementCache ( ElementCache eWhich)
inline

This method allows you to cache the pointer to the current element. This allows e.g. to work through the list (which moves the current pointer) and then restore the current pointer.

Parameters
[in]eWhichSpecifies whether the pointer to the current DV-element is buffered (M) or restored (RM).
Returns
A return value < 0 indicates an error.

◆ getErrorCode()

int ptl::ATDVList::getErrorCode ( )
inline

Returns the last error code.

Should be called after insert methods to check if errors occurred.

If errors INSTANTIATE_DVELEMENT occurred, the instance should be deleted if no other error handling is implemented in subclasses.

Returns
A return value < 0 indicates an error.
See also
ERRORS

◆ getListMode()

virtual ListMode ptl::ATDVList::getListMode ( )
inlinepure virtual

Returns the List mode.

Returns
The ListMode ptl::RESPONSIBLE is only possible for template lists that use this class. A combination of the values can also be supplied.
See also
ListMode

Example:

...
// if myList with UNIQUE-Bit...
if (myList.getListMode() & ptl::UNIQUE)
{
// ..do something...
}
Base class for void-pointer lists.
Definition PtlAVDVList.h:77
ListMode getListMode()
const ListMode UNIQUE
Definition PtlListTypes.h:340

Here pure virtual, so this class is abstract.

Implemented in ptl::TDVList< T_DATA >, and ptl::TDVList< ini::Line >.

◆ getSize()

std::size_t ptl::ATDVList::getSize ( )
inline

Returns the number of elements contained in the list.

Returns
The number of elements

Example:

std::size_t nSize = myListe.getSize()
std::size_t getSize()

◆ getVDVList()

VDVList * ptl::ATDVList::getVDVList ( )
inline

Returns the pointer to the capped VDVList. Used by iterator classes, for example, to work in this VDVList.

Returns
The referenced VDVList.

Member Data Documentation

◆ m_VDVListe

VDVList* ptl::ATDVList::m_VDVListe
protected

Pointer to VDVList, which works with void pointers.


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