ADTF
cSampleLogEntryList

Helper class to serialize and handle an ISampleLog. More...

Inheritance diagram for cSampleLogEntryList:
[legend]

Public Member Functions

 cSampleLogEntryList ()
 default CTOR.
 
 cSampleLogEntryList (const cSampleLogEntryList &oCopyList)
 Copy CTOR which will copy the given oCopyList to this list. More...
 
 cSampleLogEntryList (cSampleLogEntryList &&oMoveList)
 Move CTOR which will move the internal m_List to this list. More...
 
cSampleLogEntryListoperator= (const cSampleLogEntryList &oCopyList)
 Copy assignment which will copy the given oCopyList to this list. More...
 
cSampleLogEntryListoperator= (cSampleLogEntryList &&oMoveList)
 Move assignment which will move the given oCopyList to this list. More...
 
virtual ~cSampleLogEntryList ()
 DTOR.
 
tResult AddEntry (const ISampleLog::tSampleLogEntry &sEntry)
 Adds an entry to the list. More...
 
tResult GetLogEntries (ISampleLog::IGetLogEntryCallback &pGetCallback) const
 Copies all entries to the given pGetCallback implementation. More...
 
tResult Clear ()
 Clear this list. More...
 
tResult GetIt (const ISampleLog::tSampleLogEntry &sLogEntry)
 Implementation of the ISampleLog::IGetLogEntryCallback to get the entries of a ISampleLog. More...
 
tResult ToStream (ucom::ant::IStream &oOutStream, size_t &szSizeWritten)
 Serializes all entries to an output stream. More...
 
tResult FromStream (const ucom::ant::IStream &oInStream, size_t &szSizeRead)
 Deserializes the internal entry from an input stream. More...
 

Protected Attributes

std::list< cSampleLogEntrym_lstLogList
 current list of logs
 

Static Private Attributes

static const uint8_t m_ui8SerializedClassVersion1
 internal serialize class version
 

Detailed Description

Helper class to serialize and handle an ISampleLog.

Implements the ISampleLog::IGetLogEntryCallback to retrieve the entries of ISampleLog.

Remarks
This implementation is NOT thread safe !

Definition at line 25 of file samplelogentrylist.h.

Constructor & Destructor Documentation

◆ cSampleLogEntryList() [1/2]

cSampleLogEntryList ( const cSampleLogEntryList oCopyList)

Copy CTOR which will copy the given oCopyList to this list.

Parameters
oCopyList[in] The list to copy.

◆ cSampleLogEntryList() [2/2]

Move CTOR which will move the internal m_List to this list.

Parameters
oMoveList[in] The list to copy.

Member Function Documentation

◆ AddEntry()

tResult AddEntry ( const ISampleLog::tSampleLogEntry sEntry)

Adds an entry to the list.

The entry will be copied. (deep copy!)

Parameters
sEntry[in] The entry to add.
Return values
ERR_NOERRORentry added successfully.
ERR_NEMORYadditional information buffer can not be copied due to high memory consumption.

◆ Clear()

tResult Clear ( )

Clear this list.

Return values
ERR_NOERRORcleared.

◆ FromStream()

tResult FromStream ( const ucom::ant::IStream oInStream,
size_t &  szSizeRead 
)

Deserializes the internal entry from an input stream.

It immediately starts with reading. No Seek call in pInStream.

Parameters
oInStream[in] The Input Stream where to read the data from.
szSizeRead[out] Number of bytes read from pInStream.
Returns
Standard result Code.

◆ GetIt()

tResult GetIt ( const ISampleLog::tSampleLogEntry sLogEntry)
virtual

Implementation of the ISampleLog::IGetLogEntryCallback to get the entries of a ISampleLog.

The entry will be copied. (deep copy!)

Parameters
sLogEntry[in] The current entry to add.
Return values
ERR_NOERRORentry added successfully.
ERR_NEMORYadditional information buffer can not be copied due to high memory consumption.

Implements ISampleLog::IGetLogEntryCallback.

◆ GetLogEntries()

tResult GetLogEntries ( ISampleLog::IGetLogEntryCallback pGetCallback) const

Copies all entries to the given pGetCallback implementation.

Parameters
pGetCallback[in] callback interface to call the ISampleLog::IGetLogEntryCallback::GetIt.
Return values
ERR_NOERRORentry added successfully.
anerror error forwarded from the ISampleLog::IGetLogEntryCallback::GetIt call.

◆ operator=() [1/2]

cSampleLogEntryList& operator= ( const cSampleLogEntryList oCopyList)

Copy assignment which will copy the given oCopyList to this list.

Parameters
oCopyList[in] The list to copy.
Returns
the new entry

◆ operator=() [2/2]

cSampleLogEntryList& operator= ( cSampleLogEntryList &&  oMoveList)

Move assignment which will move the given oCopyList to this list.

Parameters
oMoveList[in] The list to copy.
Returns
the new entry

◆ ToStream()

tResult ToStream ( ucom::ant::IStream oOutStream,
size_t &  szSizeWritten 
)

Serializes all entries to an output stream.

It immediately starts writing. No Seek call in pOutStream.

Parameters
oOutStream[in] The Output Stream where to write the data to.
szSizeWritten[out] Number of bytes written to pOutStream.
Returns
Standard result Code.