Kanzi 4.0.0-beta2
kanzi::qnx::QnxPropertyHost< Derived, NativeHandleType, getIvPtr, setIvPtr, getPvPtr, setPvPtr, getCvPtr, setCvPtr, getLlvPtr, setLlvPtr > Class Template Reference

An interface to access and set QNX properties. More...

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

Public Member Functions

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< intgetPropertyIvSingle (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 longgetPropertyLlvSingle (int propertyName) const noexcept
 Gets a QNX property consisting of a single long long.
 
template<typename T >
KZ_NO_DISCARD optional< vector< T > > getPropertyPv (size_t returnValueCount, int propertyName) const noexcept
 Gets QNX property consisting of pointers.
 
template<typename T >
KZ_NO_DISCARD optional< TgetPropertyPvSingle (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.
 

Detailed Description

template<typename Derived, typename NativeHandleType, int(*)(NativeHandleType, int, int *) getIvPtr, int(*)(NativeHandleType, int, const int *) setIvPtr, int(*)(NativeHandleType, int, void **) getPvPtr, int(*)(NativeHandleType, int, void **) setPvPtr, int(*)(NativeHandleType, int, int, char *) getCvPtr, int(*)(NativeHandleType, int, int, const char *) setCvPtr, int(*)(NativeHandleType, int, long long *) getLlvPtr, int(*)(NativeHandleType, int, const long long *) setLlvPtr>
class kanzi::qnx::QnxPropertyHost< Derived, NativeHandleType, getIvPtr, setIvPtr, getPvPtr, setPvPtr, getCvPtr, setCvPtr, getLlvPtr, setLlvPtr >

An interface to access and set QNX properties.

Uses CRTP pattern. It is encouraged to derive from it and pass itself as a template parameter.

Template Parameters
DerivedCRTP derived class.
NativeHandleTypeNative QNX handle type.
getIvPtrQNX getter function for int properties.
setIvPtrQNX setter function for int properties.
getPvPtrQNX getter function for void* properties.
setPvPtrQNX setter function for void* properties.
getCvPtrQNX getter function for char properties.
setIvPtrQNX setter function for char properties.
getLlvPtrQNX getter function for long long properties.
setLlvPtrQNX setter function for long long properties.
Since
Kanzi 4.0.0

Member Function Documentation

◆ getPropertyIv()

template<typename Derived , typename NativeHandleType , int(*)(NativeHandleType, int, int *) getIvPtr, int(*)(NativeHandleType, int, const int *) setIvPtr, int(*)(NativeHandleType, int, void **) getPvPtr, int(*)(NativeHandleType, int, void **) setPvPtr, int(*)(NativeHandleType, int, int, char *) getCvPtr, int(*)(NativeHandleType, int, int, const char *) setCvPtr, int(*)(NativeHandleType, int, long long *) getLlvPtr, int(*)(NativeHandleType, int, const long long *) setLlvPtr>
KZ_NO_DISCARD optional< vector< int > > kanzi::qnx::QnxPropertyHost< Derived, NativeHandleType, getIvPtr, setIvPtr, getPvPtr, setPvPtr, getCvPtr, setCvPtr, getLlvPtr, setLlvPtr >::getPropertyIv ( size_t returnValueCount,
int propertyName ) const
inlinenoexcept

Gets QNX property consisting of ints.

Parameters
returnValueCountNumber of values to recieve.
propertyNameQNX property name.
Return values
nulloptGetting the property failed.
Returns
Vector of requested property values.

◆ getPropertyIvSingle()

template<typename Derived , typename NativeHandleType , int(*)(NativeHandleType, int, int *) getIvPtr, int(*)(NativeHandleType, int, const int *) setIvPtr, int(*)(NativeHandleType, int, void **) getPvPtr, int(*)(NativeHandleType, int, void **) setPvPtr, int(*)(NativeHandleType, int, int, char *) getCvPtr, int(*)(NativeHandleType, int, int, const char *) setCvPtr, int(*)(NativeHandleType, int, long long *) getLlvPtr, int(*)(NativeHandleType, int, const long long *) setLlvPtr>
KZ_NO_DISCARD optional< int > kanzi::qnx::QnxPropertyHost< Derived, NativeHandleType, getIvPtr, setIvPtr, getPvPtr, setPvPtr, getCvPtr, setCvPtr, getLlvPtr, setLlvPtr >::getPropertyIvSingle ( int propertyName) const
inlinenoexcept

Gets a QNX property consisting of a single int.

Parameters
propertyNameQNX property name.
Return values
nulloptGetting the property failed.
Returns
Requested property.

◆ setPropertyIv() [1/2]

template<typename Derived , typename NativeHandleType , int(*)(NativeHandleType, int, int *) getIvPtr, int(*)(NativeHandleType, int, const int *) setIvPtr, int(*)(NativeHandleType, int, void **) getPvPtr, int(*)(NativeHandleType, int, void **) setPvPtr, int(*)(NativeHandleType, int, int, char *) getCvPtr, int(*)(NativeHandleType, int, int, const char *) setCvPtr, int(*)(NativeHandleType, int, long long *) getLlvPtr, int(*)(NativeHandleType, int, const long long *) setLlvPtr>
bool kanzi::qnx::QnxPropertyHost< Derived, NativeHandleType, getIvPtr, setIvPtr, getPvPtr, setPvPtr, getCvPtr, setCvPtr, getLlvPtr, setLlvPtr >::setPropertyIv ( int propertyName,
span< int > propertyValue ) const
inlinenoexcept

Sets QNX property consisting of ints.

Parameters
propertyNameQNX property name.
propertyValueSpan of values to set property to.
Returns
On success, true, otherwise false.

◆ setPropertyIv() [2/2]

template<typename Derived , typename NativeHandleType , int(*)(NativeHandleType, int, int *) getIvPtr, int(*)(NativeHandleType, int, const int *) setIvPtr, int(*)(NativeHandleType, int, void **) getPvPtr, int(*)(NativeHandleType, int, void **) setPvPtr, int(*)(NativeHandleType, int, int, char *) getCvPtr, int(*)(NativeHandleType, int, int, const char *) setCvPtr, int(*)(NativeHandleType, int, long long *) getLlvPtr, int(*)(NativeHandleType, int, const long long *) setLlvPtr>
bool kanzi::qnx::QnxPropertyHost< Derived, NativeHandleType, getIvPtr, setIvPtr, getPvPtr, setPvPtr, getCvPtr, setCvPtr, getLlvPtr, setLlvPtr >::setPropertyIv ( int propertyName,
int propertyValue ) const
inlinenoexcept

Sets QNX property consisting of a single int.

Parameters
propertyNameQNX property name.
propertyValueValue to set property to.
Returns
On success, true, otherwise false.

◆ getPropertyPv()

template<typename Derived , typename NativeHandleType , int(*)(NativeHandleType, int, int *) getIvPtr, int(*)(NativeHandleType, int, const int *) setIvPtr, int(*)(NativeHandleType, int, void **) getPvPtr, int(*)(NativeHandleType, int, void **) setPvPtr, int(*)(NativeHandleType, int, int, char *) getCvPtr, int(*)(NativeHandleType, int, int, const char *) setCvPtr, int(*)(NativeHandleType, int, long long *) getLlvPtr, int(*)(NativeHandleType, int, const long long *) setLlvPtr>
template<typename T >
KZ_NO_DISCARD optional< vector< T > > kanzi::qnx::QnxPropertyHost< Derived, NativeHandleType, getIvPtr, setIvPtr, getPvPtr, setPvPtr, getCvPtr, setCvPtr, getLlvPtr, setLlvPtr >::getPropertyPv ( size_t returnValueCount,
int propertyName ) const
inlinenoexcept

Gets QNX property consisting of pointers.

Template Parameters
TPointer type to receive.
Parameters
returnValueCountNumber of values to recieve.
propertyNameQNX property name.
Return values
nulloptGetting the property failed.
Returns
Vector of requested property values.

◆ getPropertyPvSingle()

template<typename Derived , typename NativeHandleType , int(*)(NativeHandleType, int, int *) getIvPtr, int(*)(NativeHandleType, int, const int *) setIvPtr, int(*)(NativeHandleType, int, void **) getPvPtr, int(*)(NativeHandleType, int, void **) setPvPtr, int(*)(NativeHandleType, int, int, char *) getCvPtr, int(*)(NativeHandleType, int, int, const char *) setCvPtr, int(*)(NativeHandleType, int, long long *) getLlvPtr, int(*)(NativeHandleType, int, const long long *) setLlvPtr>
template<typename T >
KZ_NO_DISCARD optional< T > kanzi::qnx::QnxPropertyHost< Derived, NativeHandleType, getIvPtr, setIvPtr, getPvPtr, setPvPtr, getCvPtr, setCvPtr, getLlvPtr, setLlvPtr >::getPropertyPvSingle ( int propertyName) const
inlinenoexcept

Gets a QNX property consisting of a single pointer.

Template Parameters
TPointer type to receive.
Parameters
propertyNameQNX property name.
Return values
nulloptGetting the property failed.
Returns
Requested property.

◆ setPropertyPv() [1/2]

template<typename Derived , typename NativeHandleType , int(*)(NativeHandleType, int, int *) getIvPtr, int(*)(NativeHandleType, int, const int *) setIvPtr, int(*)(NativeHandleType, int, void **) getPvPtr, int(*)(NativeHandleType, int, void **) setPvPtr, int(*)(NativeHandleType, int, int, char *) getCvPtr, int(*)(NativeHandleType, int, int, const char *) setCvPtr, int(*)(NativeHandleType, int, long long *) getLlvPtr, int(*)(NativeHandleType, int, const long long *) setLlvPtr>
bool kanzi::qnx::QnxPropertyHost< Derived, NativeHandleType, getIvPtr, setIvPtr, getPvPtr, setPvPtr, getCvPtr, setCvPtr, getLlvPtr, setLlvPtr >::setPropertyPv ( int propertyName,
span< void * > propertyValue ) const
inlinenoexcept

Sets QNX property consisting of pointers.

Parameters
propertyNameQNX property name.
propertyValueSpan of values to set property to.
Returns
On success, true, otherwise false.

◆ setPropertyPv() [2/2]

template<typename Derived , typename NativeHandleType , int(*)(NativeHandleType, int, int *) getIvPtr, int(*)(NativeHandleType, int, const int *) setIvPtr, int(*)(NativeHandleType, int, void **) getPvPtr, int(*)(NativeHandleType, int, void **) setPvPtr, int(*)(NativeHandleType, int, int, char *) getCvPtr, int(*)(NativeHandleType, int, int, const char *) setCvPtr, int(*)(NativeHandleType, int, long long *) getLlvPtr, int(*)(NativeHandleType, int, const long long *) setLlvPtr>
bool kanzi::qnx::QnxPropertyHost< Derived, NativeHandleType, getIvPtr, setIvPtr, getPvPtr, setPvPtr, getCvPtr, setCvPtr, getLlvPtr, setLlvPtr >::setPropertyPv ( int propertyName,
void * propertyValue ) const
inlinenoexcept

Sets QNX property consisting of a single pointer.

Parameters
propertyNameQNX property name.
propertyValueValue to set property to.
Returns
On success, true, otherwise false.

◆ getPropertyCv()

template<typename Derived , typename NativeHandleType , int(*)(NativeHandleType, int, int *) getIvPtr, int(*)(NativeHandleType, int, const int *) setIvPtr, int(*)(NativeHandleType, int, void **) getPvPtr, int(*)(NativeHandleType, int, void **) setPvPtr, int(*)(NativeHandleType, int, int, char *) getCvPtr, int(*)(NativeHandleType, int, int, const char *) setCvPtr, int(*)(NativeHandleType, int, long long *) getLlvPtr, int(*)(NativeHandleType, int, const long long *) setLlvPtr>
KZ_NO_DISCARD optional< string > kanzi::qnx::QnxPropertyHost< Derived, NativeHandleType, getIvPtr, setIvPtr, getPvPtr, setPvPtr, getCvPtr, setCvPtr, getLlvPtr, setLlvPtr >::getPropertyCv ( size_t stringBufferSize,
int propertyName ) const
inlinenoexcept

Gets QNX property consisting of a string.

Note
If stringBufferSize is smaller than the requested string, the function truncates it.
Parameters
stringBufferSizeSize of the string to receive.
propertyNameQNX property name.
Return values
nulloptGetting the property failed.
Returns
Requested property.

◆ setPropertyCv()

template<typename Derived , typename NativeHandleType , int(*)(NativeHandleType, int, int *) getIvPtr, int(*)(NativeHandleType, int, const int *) setIvPtr, int(*)(NativeHandleType, int, void **) getPvPtr, int(*)(NativeHandleType, int, void **) setPvPtr, int(*)(NativeHandleType, int, int, char *) getCvPtr, int(*)(NativeHandleType, int, int, const char *) setCvPtr, int(*)(NativeHandleType, int, long long *) getLlvPtr, int(*)(NativeHandleType, int, const long long *) setLlvPtr>
bool kanzi::qnx::QnxPropertyHost< Derived, NativeHandleType, getIvPtr, setIvPtr, getPvPtr, setPvPtr, getCvPtr, setCvPtr, getLlvPtr, setLlvPtr >::setPropertyCv ( int propertyName,
string_view propertyValue ) const
inlinenoexcept

Sets QNX property consisting of a string.

Parameters
propertyNameQNX property name.
propertyValueValue to set property to.
Returns
On success, true, otherwise false.

◆ getPropertyLlv()

template<typename Derived , typename NativeHandleType , int(*)(NativeHandleType, int, int *) getIvPtr, int(*)(NativeHandleType, int, const int *) setIvPtr, int(*)(NativeHandleType, int, void **) getPvPtr, int(*)(NativeHandleType, int, void **) setPvPtr, int(*)(NativeHandleType, int, int, char *) getCvPtr, int(*)(NativeHandleType, int, int, const char *) setCvPtr, int(*)(NativeHandleType, int, long long *) getLlvPtr, int(*)(NativeHandleType, int, const long long *) setLlvPtr>
KZ_NO_DISCARD optional< vector< long long > > kanzi::qnx::QnxPropertyHost< Derived, NativeHandleType, getIvPtr, setIvPtr, getPvPtr, setPvPtr, getCvPtr, setCvPtr, getLlvPtr, setLlvPtr >::getPropertyLlv ( size_t returnValueCount,
int propertyName ) const
inlinenoexcept

Gets QNX property consisting of long longs.

Parameters
returnValueCountNumber of values to recieve.
propertyNameQNX property name.
Return values
nulloptGetting the property failed.
Returns
Vector of requested property values.

◆ getPropertyLlvSingle()

template<typename Derived , typename NativeHandleType , int(*)(NativeHandleType, int, int *) getIvPtr, int(*)(NativeHandleType, int, const int *) setIvPtr, int(*)(NativeHandleType, int, void **) getPvPtr, int(*)(NativeHandleType, int, void **) setPvPtr, int(*)(NativeHandleType, int, int, char *) getCvPtr, int(*)(NativeHandleType, int, int, const char *) setCvPtr, int(*)(NativeHandleType, int, long long *) getLlvPtr, int(*)(NativeHandleType, int, const long long *) setLlvPtr>
KZ_NO_DISCARD optional< long long > kanzi::qnx::QnxPropertyHost< Derived, NativeHandleType, getIvPtr, setIvPtr, getPvPtr, setPvPtr, getCvPtr, setCvPtr, getLlvPtr, setLlvPtr >::getPropertyLlvSingle ( int propertyName) const
inlinenoexcept

Gets a QNX property consisting of a single long long.

Parameters
propertyNameQNX property name.
Return values
nulloptGetting the property failed.
Returns
Requested property.

◆ setPropertyLlv() [1/2]

template<typename Derived , typename NativeHandleType , int(*)(NativeHandleType, int, int *) getIvPtr, int(*)(NativeHandleType, int, const int *) setIvPtr, int(*)(NativeHandleType, int, void **) getPvPtr, int(*)(NativeHandleType, int, void **) setPvPtr, int(*)(NativeHandleType, int, int, char *) getCvPtr, int(*)(NativeHandleType, int, int, const char *) setCvPtr, int(*)(NativeHandleType, int, long long *) getLlvPtr, int(*)(NativeHandleType, int, const long long *) setLlvPtr>
bool kanzi::qnx::QnxPropertyHost< Derived, NativeHandleType, getIvPtr, setIvPtr, getPvPtr, setPvPtr, getCvPtr, setCvPtr, getLlvPtr, setLlvPtr >::setPropertyLlv ( int propertyName,
span< long long > propertyValue ) const
inlinenoexcept

Sets QNX property consisting of long longs.

Parameters
propertyNameQNX property name.
propertyValueSpan of values to set property to.
Returns
On success, true, otherwise false.

◆ setPropertyLlv() [2/2]

template<typename Derived , typename NativeHandleType , int(*)(NativeHandleType, int, int *) getIvPtr, int(*)(NativeHandleType, int, const int *) setIvPtr, int(*)(NativeHandleType, int, void **) getPvPtr, int(*)(NativeHandleType, int, void **) setPvPtr, int(*)(NativeHandleType, int, int, char *) getCvPtr, int(*)(NativeHandleType, int, int, const char *) setCvPtr, int(*)(NativeHandleType, int, long long *) getLlvPtr, int(*)(NativeHandleType, int, const long long *) setLlvPtr>
bool kanzi::qnx::QnxPropertyHost< Derived, NativeHandleType, getIvPtr, setIvPtr, getPvPtr, setPvPtr, getCvPtr, setCvPtr, getLlvPtr, setLlvPtr >::setPropertyLlv ( int propertyName,
long long propertyValue ) const
inlinenoexcept

Sets QNX property consisting of a single long long.

Parameters
propertyNameQNX property name.
propertyValueValue to set property to.
Returns
On success, true, otherwise false.

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