ADTF
Loading...
Searching...
No Matches
adtf::streaming::ISampleBuffer Class Referenceabstract

bring latest ant::ISampleBuffer to users scope More...

#include <samplebuffer_intf.h>

Inherits adtf::ucom::ant::ISharedLockedObject.

Public Member Functions

 ADTF_IID (ISampleBuffer, "samplebuffer.ant.streaming.adtf.iid")
 Defintion of interface ID.
 
virtual tResult Write (const base::ant::IRawMemory &oBufferWrite)=0
 
virtual tResult Read (base::ant::IRawMemory &&oBufferRead) const=0
 
virtual void * GetPtr ()=0
 
virtual const void * GetPtr () const=0
 
virtual size_t GetSize () const=0
 
virtual size_t GetCapacity () const=0
 
virtual tResult Reserve (size_t szSize)=0
 
virtual tResult Resize (size_t szSize)=0
 
- Public Member Functions inherited from adtf::ucom::ant::ISharedLockedObject
 ADTF_IID (ISharedLockedObject, "sharedlockedobject.ant.ucom.adtf.iid")
 
virtual tResult LockShared () const =0
 
virtual tResult UnlockShared () const =0
 
- Public Member Functions inherited from adtf::ucom::ant::ILockedObject
 ADTF_IID (ILockedObject, "lockedobject.ant.ucom.adtf.iid")
 
virtual tResult Lock () const =0
 
virtual tResult Unlock () const =0
 
- Public Member Functions inherited from adtf::ucom::ant::IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 

Protected Member Functions

 ~ISampleBuffer ()=default
 not destructable
 
- Protected Member Functions inherited from adtf::ucom::ant::ISharedLockedObject
 ~ISharedLockedObject ()=default
 Protected destructor --> Only the final implementation can be destroyed!
 
- Protected Member Functions inherited from adtf::ucom::ant::ILockedObject
 ~ILockedObject ()=default
 Protected destructor --> Only the final implementation can be destroyed!
 
- Protected Member Functions inherited from adtf::ucom::ant::IObject
 ~IObject ()=default
 Protected destructor --> Only the final implementation can be destroyed!
 

Detailed Description

bring latest ant::ISampleBuffer to users scope

The SampleBuffer is the memory block object for the data of a ISample.

Member Function Documentation

◆ GetCapacity()

virtual size_t adtf::streaming::ant::ISampleBuffer::GetCapacity ( ) const
pure virtual

Returns the current maximal capacity in bytes.

◆ GetPtr() [1/2]

virtual const void * adtf::streaming::ant::ISampleBuffer::GetPtr ( ) const
pure virtual

Direct Reading Access. Retrieves the raw buffer content pointer.

Returns
the buffers raw pointer.

◆ GetPtr() [2/2]

virtual void * adtf::streaming::ant::ISampleBuffer::GetPtr ( )
pure virtual

Direct Writing Access. Retrieves the raw buffer content pointer.

Warning
Do not write more than GetSize() bytes !
Returns
the buffers raw pointer.

◆ GetSize()

virtual size_t adtf::streaming::ant::ISampleBuffer::GetSize ( ) const
pure virtual

Returns the current size in bytes.

◆ Read()

virtual tResult adtf::streaming::ant::ISampleBuffer::Read ( base::ant::IRawMemory && oBufferRead) const
pure virtual

Copy Reading Access. The buffer content will be copied to the given memory. Depending on implemntation of the buffer, it will grow automatically.

Parameters
[in,out]oBufferReadMemory to copy to.
Returns
Standard Result Code.

◆ Reserve()

virtual tResult adtf::streaming::ant::ISampleBuffer::Reserve ( size_t szSize)
pure virtual

Reserves memory. Capacity will be at least szSize bytes. Current data will be lost.

Parameters
szSize[in] Size in bytes.
Returns
standard result.

◆ Resize()

virtual tResult adtf::streaming::ant::ISampleBuffer::Resize ( size_t szSize)
pure virtual

Resizes the Buffer. Capacity will be at least szSize bytes. Current data will be retained.

Parameters
szSize[in] Size in bytes.
Returns
standard result.

◆ Write()

virtual tResult adtf::streaming::ant::ISampleBuffer::Write ( const base::ant::IRawMemory & oBufferWrite)
pure virtual

Copy Writing Access. The given memory will be copied to the buffer. Depending on implemntation of the buffer, it will grow automatically.

Parameters
[in]oBufferWriteMemory to copy from.
Returns
Standard Result Code.

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