Kanzi 4.0.0-beta2
kanzi::qnx::QnxStreamMethods Class Reference

Class representing QNX stream methods. More...

#include <kanzi/platform/platform/windowing_ng/qnx_screen/qnx_screen_stream.hpp>

Inheritance diagram for kanzi::qnx::QnxStreamMethods:
[legend]

Public Member Functions

QnxBuffer< QnxBufferCleanupStrategy::AcquireReleaseacquireBuffer () const noexcept
 Acquires a buffer from the stream.
 
template<QnxBufferCleanupStrategy cleanupStrategy>
bool attachBuffer (const QnxBuffer< cleanupStrategy > &buffer) const noexcept
 Attaches a single buffer to the stream.
 
template<QnxBufferCleanupStrategy cleanupStrategy>
bool attachBuffers (span< QnxBuffer< cleanupStrategy > > buffers) const noexcept
 Attaches buffers to the stream.
 
bool consumeStream (const QnxStream &producer) const noexcept
 Consumes stream.
 
bool createBuffers (size_t bufferCount) const noexcept
 Creates buffers for this stream.
 
bool destroyBuffers () const noexcept
 Destroys buffers allocated for this stream.
 
template<QnxBufferCleanupStrategy cleanupStrategy>
bool postBuffer (const QnxBuffer< cleanupStrategy > &buffer) const noexcept
 Submits screen buffer to the stream.
 
KZ_NO_DISCARD QnxBuffer< QnxBufferCleanupStrategy::NoneretrieveFrontBuffer () const noexcept
 Retrieves QNX buffer used by this stream.
 
- Public Member Functions inherited from kanzi::qnx::QnxPropertyHost< QnxStreamMethods, KANZI_GENERATE_QNX_PROPERTY_HOST_SIGNATURE(stream)>
KZ_NO_DISCARD optional< string > getPropertyCv (size_t stringBufferSize, int propertyName) const noexcept
 Gets QNX property consisting of a string.
 
KZ_NO_DISCARD optional< vector< int > > getPropertyIv (size_t returnValueCount, int propertyName) const noexcept
 Gets QNX property consisting of ints.
 
KZ_NO_DISCARD optional< int > getPropertyIvSingle (int propertyName) const noexcept
 Gets a QNX property consisting of a single int.
 
KZ_NO_DISCARD optional< vector< long long > > getPropertyLlv (size_t returnValueCount, int propertyName) const noexcept
 Gets QNX property consisting of long longs.
 
KZ_NO_DISCARD optional< long long > getPropertyLlvSingle (int propertyName) const noexcept
 Gets a QNX property consisting of a single long long.
 
KZ_NO_DISCARD optional< vector< T > > getPropertyPv (size_t returnValueCount, int propertyName) const noexcept
 Gets QNX property consisting of pointers.
 
KZ_NO_DISCARD optional< T > getPropertyPvSingle (int propertyName) const noexcept
 Gets a QNX property consisting of a single pointer.
 
bool setPropertyCv (int propertyName, string_view propertyValue) const noexcept
 Sets QNX property consisting of a string.
 
bool setPropertyIv (int propertyName, int propertyValue) const noexcept
 Sets QNX property consisting of a single int.
 
bool setPropertyIv (int propertyName, span< int > propertyValue) const noexcept
 Sets QNX property consisting of ints.
 
bool setPropertyLlv (int propertyName, long long propertyValue) const noexcept
 Sets QNX property consisting of a single long long.
 
bool setPropertyLlv (int propertyName, span< long long > propertyValue) const noexcept
 Sets QNX property consisting of long longs.
 
bool setPropertyPv (int propertyName, span< void * > propertyValue) const noexcept
 Sets QNX property consisting of pointers.
 
bool setPropertyPv (int propertyName, void *propertyValue) const noexcept
 Sets QNX property consisting of a single pointer.
 

Protected Member Functions

 QnxStreamMethods () noexcept=default
 Constructor.
 
 QnxStreamMethods (const NativeHandleType &handle) noexcept
 Constructor.
 
- Protected Member Functions inherited from kanzi::OptionalHandle< screen_stream_t, nullptr, screen_destroy_stream >
KZ_NO_DISCARD optional< screen_stream_t > createOptional () const noexcept
 Creates a kanzi::optional copy of the native handle.
 
KZ_NO_DISCARD const screen_stream_t get () const noexcept
 Provides access to stored handle.
 
KZ_NO_DISCARD screen_stream_t get () noexcept
 Provides access to stored handle.
 
KZ_NO_DISCARD const screen_stream_t getNativeHandle () const noexcept
 Provides access to stored handle.
 
KZ_NO_DISCARD screen_stream_t getNativeHandle () noexcept
 Provides access to stored handle.
 
KZ_NO_DISCARD bool hasValue () const noexcept
 Checks if a handle is stored.
 
KZ_NO_DISCARD operator bool () const noexcept
 Conversion operator to bool.
 
KZ_NO_DISCARD screen_stream_t && operator* () &&noexcept
 Provides access to stored handle via rvalue reference.
 
KZ_NO_DISCARD screen_stream_t & operator* () &noexcept
 Provides access to stored handle via reference.
 
KZ_NO_DISCARD const screen_stream_t && operator* () const &&noexcept
 Provides access to stored handle via const rvalue reference.
 
KZ_NO_DISCARD const screen_stream_t & operator* () const &noexcept
 Provides access to stored handle via const reference.
 
OptionalHandleoperator= (const OptionalHandle &other)=delete
 Copy assignment operator.
 
OptionalHandleoperator= (const screen_stream_t &value)
 Copy assignment operator.
 
OptionalHandleoperator= (OptionalHandle &&other) noexcept
 Move assignment operator.
 
OptionalHandleoperator= (screen_stream_t &&value) noexcept
 Move assignment operator.
 
 OptionalHandle () noexcept
 Constructor.
 
 OptionalHandle (const OptionalHandle &other)=delete
 Copy constructor.
 
 OptionalHandle (const screen_stream_t &nativeHandle) noexcept
 Constructor.
 
 OptionalHandle (OptionalHandle &&other) noexcept
 Move constructor.
 
screen_stream_t release () noexcept
 Releases ownership of a native handle without destroying the resource.
 
void reset () noexcept
 Replaces stored handle with sentinel value.
 
void reset (U &&newHandle) noexcept
 Stores a new handle inside.
 
void swap (OptionalHandle &other)
 Swap function.
 
KZ_NO_DISCARD optional< screen_stream_t > toOptional () &&noexcept
 Converts OptionalHandle to kanzi::optional.
 
 ~OptionalHandle ()
 Destructor.
 
- Protected Member Functions inherited from kanzi::qnx::QnxPropertyHost< QnxStreamMethods, KANZI_GENERATE_QNX_PROPERTY_HOST_SIGNATURE(stream)>
KZ_NO_DISCARD optional< string > getPropertyCv (size_t stringBufferSize, int propertyName) const noexcept
 Gets QNX property consisting of a string.
 
KZ_NO_DISCARD optional< vector< int > > getPropertyIv (size_t returnValueCount, int propertyName) const noexcept
 Gets QNX property consisting of ints.
 
KZ_NO_DISCARD optional< int > getPropertyIvSingle (int propertyName) const noexcept
 Gets a QNX property consisting of a single int.
 
KZ_NO_DISCARD optional< vector< long long > > getPropertyLlv (size_t returnValueCount, int propertyName) const noexcept
 Gets QNX property consisting of long longs.
 
KZ_NO_DISCARD optional< long long > getPropertyLlvSingle (int propertyName) const noexcept
 Gets a QNX property consisting of a single long long.
 
KZ_NO_DISCARD optional< vector< T > > getPropertyPv (size_t returnValueCount, int propertyName) const noexcept
 Gets QNX property consisting of pointers.
 
KZ_NO_DISCARD optional< T > getPropertyPvSingle (int propertyName) const noexcept
 Gets a QNX property consisting of a single pointer.
 
bool setPropertyCv (int propertyName, string_view propertyValue) const noexcept
 Sets QNX property consisting of a string.
 
bool setPropertyIv (int propertyName, int propertyValue) const noexcept
 Sets QNX property consisting of a single int.
 
bool setPropertyIv (int propertyName, span< int > propertyValue) const noexcept
 Sets QNX property consisting of ints.
 
bool setPropertyLlv (int propertyName, long long propertyValue) const noexcept
 Sets QNX property consisting of a single long long.
 
bool setPropertyLlv (int propertyName, span< long long > propertyValue) const noexcept
 Sets QNX property consisting of long longs.
 
bool setPropertyPv (int propertyName, span< void * > propertyValue) const noexcept
 Sets QNX property consisting of pointers.
 
bool setPropertyPv (int propertyName, void *propertyValue) const noexcept
 Sets QNX property consisting of a single pointer.
 

Static Protected Member Functions

static KZ_NO_DISCARD QnxStreamMethods create (const NativeHandleType handle) noexcept
 Tries to create an object from a native handle.
 
static KZ_NO_DISCARD QnxStreamMethods create (const QnxContext &qnxContext) noexcept
 Tries to create a QNX stream.
 
- Static Protected Member Functions inherited from kanzi::OptionalHandle< screen_stream_t, nullptr, screen_destroy_stream >
static constexpr auto getDeleter () noexcept
 Gets deleter function.
 
static constexpr screen_stream_t getSentinel () noexcept
 Gets sentinel value that can be used to represent invalid handle.
 

Additional Inherited Members

- Protected Types inherited from kanzi::OptionalHandle< screen_stream_t, nullptr, screen_destroy_stream >
using HandleType
 Alias for this handle type.
 
using NativeHandleType
 Alias for the underlying native handle type.
 
- Protected Attributes inherited from kanzi::OptionalHandle< screen_stream_t, nullptr, screen_destroy_stream >
FlatOptional< screen_stream_t, sentinel > m_handle
 Native handle that is managed by this class.
 

Detailed Description

Class representing QNX stream methods.

Note
Do not use this class directly. Use QnxStream instead.
See also
QnxStream
Since
Kanzi 4.0.0

Constructor & Destructor Documentation

◆ QnxStreamMethods() [1/2]

kanzi::qnx::QnxStreamMethods::QnxStreamMethods ( )
explicitprotecteddefaultnoexcept

Constructor.

◆ QnxStreamMethods() [2/2]

kanzi::qnx::QnxStreamMethods::QnxStreamMethods ( const NativeHandleType & handle)
explicitprotectednoexcept

Constructor.

Parameters
handleNative handle.

Member Function Documentation

◆ retrieveFrontBuffer()

KZ_NO_DISCARD QnxBuffer< QnxBufferCleanupStrategy::None > kanzi::qnx::QnxStreamMethods::retrieveFrontBuffer ( ) const
noexcept

Retrieves QNX buffer used by this stream.

Returns
QNX buffer used by this stream. If an error occurred, empty.

◆ createBuffers()

bool kanzi::qnx::QnxStreamMethods::createBuffers ( size_t bufferCount) const
noexcept

Creates buffers for this stream.

Parameters
bufferCountAmount of buffers to create.
Returns
True on success, false on failure.

◆ destroyBuffers()

bool kanzi::qnx::QnxStreamMethods::destroyBuffers ( ) const
noexcept

Destroys buffers allocated for this stream.

Returns
True on success, false on failure.

◆ postBuffer()

template<QnxBufferCleanupStrategy cleanupStrategy>
bool QnxStreamMethods::postBuffer ( const QnxBuffer< cleanupStrategy > & buffer) const
noexcept

Submits screen buffer to the stream.

Template Parameters
cleanupStrategyCleanup strategy to use.
See also
QnxBufferCleanupStrategy for more details.
Parameters
bufferBuffer to submit.
Returns
True on success, false on failure.

◆ consumeStream()

bool kanzi::qnx::QnxStreamMethods::consumeStream ( const QnxStream & producer) const
noexcept

Consumes stream.

Parameters
producerProducer stream to be consumed.
Returns
True on success, false on failure.

◆ attachBuffers()

template<QnxBufferCleanupStrategy cleanupStrategy>
bool QnxStreamMethods::attachBuffers ( span< QnxBuffer< cleanupStrategy > > buffers) const
noexcept

Attaches buffers to the stream.

Template Parameters
cleanupStrategyCleanup strategy to use.
See also
QnxBufferCleanupStrategy for more details.
Parameters
buffersBuffers to attach. Must include at least one buffer.
Returns
True on success, false on failure.

◆ attachBuffer()

template<QnxBufferCleanupStrategy cleanupStrategy>
bool QnxStreamMethods::attachBuffer ( const QnxBuffer< cleanupStrategy > & buffer) const
noexcept

Attaches a single buffer to the stream.

See also
attachBuffers()
Template Parameters
cleanupStrategyCleanup strategy to use.
See also
QnxBufferCleanupStrategy for more details.
Parameters
bufferBuffer to attach.
Returns
True on success, false on failure.

◆ acquireBuffer()

QnxBuffer< QnxBufferCleanupStrategy::AcquireRelease > kanzi::qnx::QnxStreamMethods::acquireBuffer ( ) const
noexcept

Acquires a buffer from the stream.

Returns
Created object for the acquired buffer. If an error occurred, empty.

◆ create() [1/2]

static KZ_NO_DISCARD QnxStreamMethods kanzi::qnx::QnxStreamMethods::create ( const QnxContext & qnxContext)
staticprotectednoexcept

Tries to create a QNX stream.

Parameters
qnxContextQNX context.
Returns
The created object. If error occurred, empty.

◆ create() [2/2]

static KZ_NO_DISCARD QnxStreamMethods kanzi::qnx::QnxStreamMethods::create ( const NativeHandleType handle)
staticprotectednoexcept

Tries to create an object from a native handle.

Parameters
handleNative handle.
Returns
Optional-like object. If an error occurred, empty.

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