ADTF
|
Sample Data getter for an easy use of samples with samplebuffer set to the type T. More...
Public Member Functions | |
sample_data () | |
CTOR. | |
sample_data (const sample_data &oSampleData) | |
CTOR. | |
sample_data (sample_data &&oSampleData) | |
move CTOR More... | |
sample_data (const ucom::iobject_ptr< const ISample > &pSample) | |
copy CTOR More... | |
tTimeStamp | GetTime () const |
retrieves the time of the data. More... | |
const T * | GetDataPtr () const |
Retrieves the pointer to the datas memory. More... | |
const T | GetData () const |
Retrieves the pointer to the datas memory as type T*. More... | |
bool | IsValid () const |
Validate if sample and sample buffer is set. More... | |
operator bool () const | |
Validate if sample and sample buffer is set. More... | |
operator T () const | |
Convert the content of sample buffer as. More... | |
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. More... | |
tResult | Reset () |
Resets the sample the sample data reference to. More... | |
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 (adtf::streaming::flash::sample_data) from the flash namespace.
Definition at line 32 of file sample_data.h.
|
inline |
|
inline |
copy CTOR
pSample | Sample to get the data from |
Definition at line 56 of file sample_data.h.
References sample_data< T >::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 sample_data< T >::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 sample_data< T >::GetData(), and sample_data< T >::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 sample_data< T >::operator bool(), and sample_data< T >::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 sample_data< T >::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 sample_data< T >::GetDataPtr(), and sample_data< T >::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 object_ptr< T >::Reset(), and RETURN_NOERROR.
Referenced by sample_data< T >::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.