GlobalObjects
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 &)
 
ATDVListoperator= (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).

References ptl::DEFAULT.

Referenced by ATDVList(), ptl::TDVList< T_DATA >::TDVList(), and operator=().

◆ ~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.

References ATDVList().

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.

References m_VDVListe.

◆ 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

References m_VDVListe.

◆ 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:92
ListMode getListMode()
const ListMode UNIQUE
Definition PtlListTypes.h:354

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()

References m_VDVListe.

◆ 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.

References m_VDVListe.

◆ operator=()

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

Assignment operator= is not available

References ATDVList().

Member Data Documentation

◆ m_VDVListe


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