Sample Data getter for an easy use of samples with samplebuffer set to the type T. More...
#include <sample_data.h>
Public Member Functions | |
sample_data () | |
CTOR. | |
sample_data (const sample_data &oSampleData) | |
CTOR. | |
sample_data (sample_data &&oSampleData) | |
move CTOR | |
sample_data (const ucom::iobject_ptr< const ISample > &pSample) | |
copy CTOR | |
tTimeStamp | GetTime () const |
retrieves the time of the data. | |
const T * | GetDataPtr () const |
Retrieves the pointer to the datas memory. | |
const T | GetData () const |
Retrieves the pointer to the datas memory as type T*. | |
bool | IsValid () const |
Validate if sample and sample buffer is set. | |
operator bool () const | |
Validate if sample and sample buffer is set. | |
operator T () const | |
Convert the content of sample buffer as. | |
tResult | Reset (const ucom::ant::iobject_ptr< const ISample > &pSample) |
Resets the sample the sample data reference to with a new reference to a sample. | |
tResult | Reset () |
Resets the sample the sample data reference to. | |
Protected Attributes | |
ucom::object_ptr< const ISample > | m_pCurrentSample |
ucom::object_ptr_shared_locked< const ISampleBuffer > | m_pBuffer |
Sample Data getter for an easy use of samples with samplebuffer set to the type T.
T | type of content of the samples sample buffer to get via GetData or sample_data::operator::T |
Please use the newer versions (sample_data) from the flash namespace.
Definition at line 32 of file sample_data.h.
|
inline |
|
inline |
|
inline |
move CTOR
oSampleData | Data to move from |
Definition at line 49 of file sample_data.h.
References sample_data().
|
inline |
copy CTOR
pSample | Sample to get the data from |
Definition at line 56 of file sample_data.h.
References Reset().
|
inline |
Retrieves the pointer to the datas memory as type T*.
Internally it gets the buffer pointer of the sample.
nullptr | no buffer set |
Definition at line 100 of file sample_data.h.
References GetDataPtr().
|
inline |
Retrieves the pointer to the datas memory.
Internally it gets the buffer pointer of the sample.
nullptr | no buffer set |
Definition at line 84 of file sample_data.h.
Referenced by GetData(), and operator T().
|
inline |
retrieves the time of the data.
Internally it gets the time of the sample.
-1 | no time set |
Definition at line 68 of file sample_data.h.
|
inline |
Validate if sample and sample buffer is set.
true | is valid |
false | is invalid |
Definition at line 116 of file sample_data.h.
Referenced by operator bool(), and operator T().
|
inline |
Validate if sample and sample buffer is set.
true | is valid |
false | is invalid |
Definition at line 125 of file sample_data.h.
References IsValid().
|
inline |
Convert the content of sample buffer as.
T() | if no sample buffer set |
Definition at line 135 of file sample_data.h.
References GetDataPtr(), and IsValid().
|
inline |
Resets the sample the sample data reference to.
The reference will be empty.
ERR_NOERROR | sample is reset |
Definition at line 164 of file sample_data.h.
References RETURN_NOERROR.
Referenced by sample_data(), and sample_data().
|
inline |
Resets the sample the sample data reference to with a new reference to a sample.
pSample | [in] Reference to the sampel the sample data will reference to |
ERR_NOERROR | sample is reset |
Definition at line 151 of file sample_data.h.
References RETURN_IF_FAILED, and RETURN_NOERROR.
|
protected |
Definition at line 36 of file sample_data.h.
|
protected |
Definition at line 35 of file sample_data.h.