ADTF
Loading...
Searching...
No Matches
adtf::streaming::ant::cSampleLogEntry Class Reference

#include <samplelogentry.h>

Classes

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

Public Member Functions

 cSampleLogEntry ()
 
 cSampleLogEntry (const cSampleLogEntry &oEntry)
 
cSampleLogEntryoperator= (const cSampleLogEntry &oEntry)
 
 cSampleLogEntry (const ISampleLog::tSampleLogEntry &sEntry)
 
 ~cSampleLogEntry ()
 DTOR.
 
 cSampleLogEntry (cSampleLogEntry &&oEntry)
 
cSampleLogEntryoperator= (cSampleLogEntry &&oEntry)
 
tResult SetEntry (const ISampleLog::tSampleLogEntry *psEntry)
 
const ISampleLog::tSampleLogEntryGetEntry () const
 
tResult ToStream (ucom::ant::IStream &oOutStream, size_t &nSizeWritten) const
 
tResult FromStream (const ucom::ant::IStream &oInStream, size_t &nSizeRead)
 
bool operator== (const ISampleLog::tSampleLogEntry &sEntry) const
 
bool operator== (const cSampleLogEntry &oEntry) const
 
 operator const ISampleLog::tSampleLogEntry * () const
 
 operator const ISampleLog::tSampleLogEntry & () const
 
tResult ToString (const adtf_util::cString &strSampleID, adtf_util::cString &strResult, const IHandleInfo *pHandleInfo=nullptr, const adtf_util::cString &strSeparator=";") const
 

Static Public Member Functions

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

Detailed Description

Helper Wrapper Class to handle a Sample Log Entry. Storage class for ISampleLog::tSampleLogEntry structure.

Constructor & Destructor Documentation

◆ cSampleLogEntry() [1/3]

adtf::streaming::ant::cSampleLogEntry::cSampleLogEntry ( )

Default CTOR.

◆ cSampleLogEntry() [2/3]

adtf::streaming::ant::cSampleLogEntry::cSampleLogEntry ( const cSampleLogEntry & oEntry)

Copy CTOR. Copies the Values of oEntry to this new entry.

Parameters
oEntry[in] Values to copy.

◆ cSampleLogEntry() [3/3]

adtf::streaming::ant::cSampleLogEntry::cSampleLogEntry ( const ISampleLog::tSampleLogEntry & sEntry)

Copy CTOR. Copies the Values of sEntry to this new entry.

Parameters
sEntry[in] Values to copy.

Member Function Documentation

◆ FromStream()

tResult adtf::streaming::ant::cSampleLogEntry::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 adtf::streaming::ant::cSampleLogEntry::GetEmptySampleID ( )
static

static helper to get an empty sample id.

Returns
return an empty sample id.

◆ GetEntry()

const ISampleLog::tSampleLogEntry * adtf::streaming::ant::cSampleLogEntry::GetEntry ( ) const

Gets the internal structure.

Returns
a reference of the internal values.

◆ IsEqualSampleID()

static bool adtf::streaming::ant::cSampleLogEntry::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 &()

adtf::streaming::ant::cSampleLogEntry::operator const ISampleLog::tSampleLogEntry & ( ) const

Accessor for the entry via reference.

Returns
reference to the internal entry structure.

◆ operator const ISampleLog::tSampleLogEntry *()

adtf::streaming::ant::cSampleLogEntry::operator const ISampleLog::tSampleLogEntry * ( ) const

Accessor for the entry via reference pointer.

Returns
reference pointer to the internal entry structure.

◆ operator=()

cSampleLogEntry & adtf::streaming::ant::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 adtf::streaming::ant::cSampleLogEntry::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 adtf::streaming::ant::cSampleLogEntry::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 adtf::streaming::ant::cSampleLogEntry::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 adtf::streaming::ant::cSampleLogEntry::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 adtf::streaming::ant::cSampleLogEntry::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.

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