ADTF
cSampleLogEntry

Helper Wrapper Class to handle a Sample Log Entry. More...

Classes

class  IHandleInfo
 internal callback class to get valid names for the cSampleLogEntry::ToString function More...
 

Public Member Functions

 cSampleLogEntry ()
 Default CTOR.
 
 cSampleLogEntry (const cSampleLogEntry &oEntry)
 Copy CTOR. More...
 
cSampleLogEntryoperator= (const cSampleLogEntry &oEntry)
 Copy assignment. More...
 
 cSampleLogEntry (const ISampleLog::tSampleLogEntry &sEntry)
 Copy CTOR. More...
 
 ~cSampleLogEntry ()
 DTOR.
 
 cSampleLogEntry (cSampleLogEntry &&oEntry)
 
cSampleLogEntryoperator= (cSampleLogEntry &&oEntry)
 
tResult SetEntry (const ISampleLog::tSampleLogEntry *psEntry)
 Sets the Values of the Entry by copying from psEntry. More...
 
const ISampleLog::tSampleLogEntryGetEntry () const
 Gets the internal structure. More...
 
tResult ToStream (ucom::ant::IStream &oOutStream, size_t &nSizeWritten) const
 Serializes the internal entry to an output stream. More...
 
tResult FromStream (const ucom::ant::IStream &oInStream, size_t &nSizeRead)
 Deserializes the internal entry from an input stream. More...
 
bool operator== (const ISampleLog::tSampleLogEntry &sEntry) const
 Compares the Entries. More...
 
bool operator== (const cSampleLogEntry &oEntry) const
 Compares the Entries. More...
 
 operator const ISampleLog::tSampleLogEntry * () const
 Accessor for the entry via reference pointer. More...
 
 operator const ISampleLog::tSampleLogEntry & () const
 Accessor for the entry via reference. More...
 
tResult ToString (const adtf_util::cString &strSampleID, adtf_util::cString &strResult, const IHandleInfo *pHandleInfo=nullptr, const adtf_util::cString &strSeparator=";") const
 Serializes the entry to a string value due to strSeparator. More...
 

Static Public Member Functions

static ISampleLog::tSampleLogSampleID GetEmptySampleID ()
 static helper to get an empty sample id. More...
 
static bool IsEqualSampleID (const ISampleLog::tSampleLogSampleID &sID1, const ISampleLog::tSampleLogSampleID &sID2)
 static helper to compare sample ids. More...
 

Private Member Functions

tResult SetAdditionalData (const void *pData, size_t szAdditionalData)
 internal use only
 
bool IsEqual (const ISampleLog::tSampleLogEntry &sEntry) const
 

Private Attributes

ISampleLog::tSampleLogEntry m_sEntry
 internal use only
 
adtf_util::cMemoryBlock m_oAdditionalData
 

Detailed Description

Helper Wrapper Class to handle a Sample Log Entry.

Storage class for ISampleLog::tSampleLogEntry structure.

Definition at line 22 of file samplelogentry.h.

Constructor & Destructor Documentation

◆ cSampleLogEntry() [1/2]

cSampleLogEntry ( const cSampleLogEntry oEntry)

Copy CTOR.

Copies the Values of oEntry to this new entry.

Parameters
oEntry[in] Values to copy.

◆ cSampleLogEntry() [2/2]

Copy CTOR.

Copies the Values of sEntry to this new entry.

Parameters
sEntry[in] Values to copy.

Member Function Documentation

◆ FromStream()

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

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.
nSizeRead[out] Number of bytes read from pInStream.
Returns
Standard result Code.

◆ GetEmptySampleID()

static ISampleLog::tSampleLogSampleID GetEmptySampleID ( )
static

static helper to get an empty sample id.

Returns
return an empty sample id.

◆ GetEntry()

const ISampleLog::tSampleLogEntry* GetEntry ( ) const

Gets the internal structure.

Returns
a reference of the internal values.

◆ IsEqualSampleID()

static bool IsEqualSampleID ( const ISampleLog::tSampleLogSampleID sID1,
const ISampleLog::tSampleLogSampleID sID2 
)
static

static helper to compare sample ids.

Parameters
sID1[in] The Sample ID 1.
sID2[in] The Sample ID 2.
Return values
trueif equal
falseif not equal

◆ operator const ISampleLog::tSampleLogEntry &()

operator const ISampleLog::tSampleLogEntry & ( ) const

Accessor for the entry via reference.

Returns
reference to the internal entry structure.

◆ operator const ISampleLog::tSampleLogEntry *()

operator const ISampleLog::tSampleLogEntry * ( ) const

Accessor for the entry via reference pointer.

Returns
reference pointer to the internal entry structure.

◆ operator=()

cSampleLogEntry& operator= ( const cSampleLogEntry oEntry)

Copy assignment.

Copies the Values of oEntry to this new entry.

Parameters
oEntry[in] Values to copy.
Returns
the new entry

◆ operator==() [1/2]

bool operator== ( const cSampleLogEntry oEntry) const

Compares the Entries.

Parameters
oEntry[in] The entry to compare to.
Return values
trueif equal
falseif not equal

◆ operator==() [2/2]

bool operator== ( const ISampleLog::tSampleLogEntry sEntry) const

Compares the Entries.

Parameters
sEntry[in] The entry to compare to.
Return values
trueif equal
falseif not equal

◆ SetEntry()

tResult SetEntry ( const ISampleLog::tSampleLogEntry psEntry)

Sets the Values of the Entry by copying from psEntry.

Parameters
psEntry[in] Values to copy.
Return values
ERR_NOERROR

◆ ToStream()

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

Serializes the internal entry 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.
nSizeWritten[out] Number of bytes written to pOutStream.
Returns
Standard result Code.

◆ ToString()

tResult ToString ( const adtf_util::cString &  strSampleID,
adtf_util::cString &  strResult,
const IHandleInfo pHandleInfo = nullptr,
const adtf_util::cString &  strSeparator = ";" 
) const

Serializes the entry to a string value due to strSeparator.

Parameters
strSampleID[in, out] The Sample ID as String.
strResult[in, out] The whole entry as String.
pHandleInfo[in] A handle info callback to get valid names for ThreadID and CreatorID.
strSeparator[in] if separator is not empty a comma separated list will be generated for this entry. if separator is empty a log formated string will be generated.
Return values
ERR_NOERRORString is generated.
anerror the string generated is not valid, i.e. string generation aborted.