xentara-plugin v2.1
The Xentara Plugin Framework
Loading...
Searching...
No Matches
xentara::data Namespace Reference

Functionality for accessing the value of Xentara attributes. More...

Classes

class  DataType
 A custom type. More...
 
class  FixedValue
 A helper class that allows constructing read handles that return fixed values. More...
 
class  Image
 An image data point value. More...
 
class  ReadHandle
 A handle for reading a data value. More...
 
class  WriteHandle
 A handle for writing a data value. More...
 

Concepts

concept  PixelCppType
 Concept for types that can be used to store image pixels.
 

Typedefs

template<PixelType kPixelType>
using PixelTypeToCppType = typename __opaque_find_pixel_cpp_type__< kPixelType >::type
 The C++ type associated with a specific PixelType enum.
 
template<NativeType kNativeType, TypeUsage kUsage = TypeUsage::Get>
using NativeTypeToCppType = typename __opaque_find_native_cpp_type__< kNativeType, kUsage >::type
 The C++ type associated with a specific NativeType enum.
 
using Qualities = utils::core::Flags< Quality >
 A combination of different qualities.
 

Enumerations

enum class  ColorSpace {
  Mono , Rgb , Rgba , PremultipliedRgba ,
  Bgr , Bgra , PremultipliedBgra , Hsv ,
  Hls , Hsv255 , Hls255 , Xyz ,
  Luv , Lab , YCrCb , BayerBg ,
  BayerGb , BayerRg , BayerGr , Yuv444 ,
  Yuv420sp_Nv12 , Yuv420sp_Nv21 , Yuv420p_I420 , Yuv420p_Yv12 ,
  Yuv422_Uyvy , Yuv422_Yuy2 , Yuv422_Yvyu , internal
}
 Colour spaces for images. More...
 
enum class  ColorDepth {
  Unsigned8Bit , Unsigned10Bit , Unsigned12Bit , Unsigned16Bit ,
  Signed8Bit , Signed16Bit , Float32 , Float64 ,
  internal
}
 Colour depths for images. More...
 
enum class  PixelType {
  Uint8 , Uint16 , Int8 , Int16 ,
  Float , Double
}
 The C++ type used for the individual pixels in an image. More...
 
enum class  NativeType {
  Boolean , Integer , UnsignedInteger , FloatingPoint ,
  String , WString , U8String , U16String ,
  U32String , Image , TimePoint , Uuid ,
  Quality , ElementCategory , ErrorCode , Custom ,
  None
}
 An enum describing different types of native C++ data used in read and write handles. More...
 
enum class  TypeUsage { Get , Put }
 usage for a type when converting between NativeType and C++ types More...
 
enum class  Quality : std::uint8_t { Good , Acceptable , Unreliable , Bad , internal }
 A Quality for a data point value. More...
 

Functions

template<typename CppType >
requires PixelCppType<std::remove_cvref_t<CppType>>
constexpr auto cppTypeToPixelType () noexcept -> PixelType
 Find the correct PixelType enum to use for a C++ type.
 
constexpr auto channelCount (ColorSpace colorSpace) noexcept -> std::size_t
 Gets the number of channels in a colour space.
 
template<utils::tools::CharType Char>
auto toBasicString (ColorSpace colorSpace) -> std::basic_string_view< Char >
 Converts a colour space value to a string.
 
auto toString (ColorSpace colorSpace) -> std::string_view
 Converts a colour space value to a string of type char
 
auto toWString (ColorSpace colorSpace) -> std::wstring_view
 Converts a colour space value to a string of type wchar_t
 
auto toU8String (ColorSpace colorSpace) -> std::u8string_view
 Converts a colour space value to a string of type char8_t
 
auto toU16String (ColorSpace colorSpace) -> std::u16string_view
 Converts a colour space value to a string of type char16_t
 
auto toU32String (ColorSpace colorSpace) -> std::u32string_view
 Converts a colour space value to a string of type char32_t
 
auto operator<< (std::ostream &stream, ColorSpace colorSpace) -> std::ostream &
 Stream insertion operator for color space values.
 
constexpr auto pixelType (ColorDepth colorDepth) noexcept -> PixelType
 Gets the pixel type for a colour depth.
 
template<utils::tools::CharType Char>
auto toBasicString (ColorDepth colorDepth) -> std::basic_string_view< Char >
 Converts a colour depth to a string.
 
auto toString (ColorDepth colorDepth) -> std::string_view
 Converts a colour depth to a string of type char
 
auto toWString (ColorDepth colorDepth) -> std::wstring_view
 Converts a colour depth to a string of type wchar_t
 
auto toU8String (ColorDepth colorDepth) -> std::u8string_view
 Converts a colour depth to a string of type char8_t
 
auto toU16String (ColorDepth colorDepth) -> std::u16string_view
 Converts a colour depth to a string of type char16_t
 
auto toU32String (ColorDepth colorDepth) -> std::u32string_view
 Converts a colour depth to a string of type char32_t
 
auto operator<< (std::ostream &stream, ColorDepth colorDepth) -> std::ostream &
 Stream insertion operator for target color depths.
 
template<typename CppType >
constexpr auto cppTypeToNativeType (TypeUsage usage=TypeUsage::Put) noexcept -> NativeType
 Find the correct NativeType enum to use for a C++ type.
 
template<utils::tools::CharType Char>
auto toBasicString (Quality quality) -> std::basic_string_view< Char >
 Converts a quality value to a string.
 
auto toString (Quality quality) -> std::string_view
 Converts a quality value to a string of type char
 
auto toWString (Quality quality) -> std::wstring_view
 Converts a quality value to a string of type wchar_t
 
auto toU8String (Quality quality) -> std::u8string_view
 Converts a quality value to a string of type char8_t
 
auto toU16String (Quality quality) -> std::u16string_view
 Converts a quality value to a string of type char16_t
 
auto toU32String (Quality quality) -> std::u32string_view
 Converts a number to a string of type char32_t
 
constexpr auto isBetter (Quality quality, Quality referenceQuality) noexcept -> bool
 Determines if one quality is better than another quality.
 
constexpr auto isWorse (Quality quality, Quality referenceQuality) noexcept -> bool
 Determines if one quality is worse than another quality.
 
template<std::convertible_to< Quality >... MoreQualities>
constexpr auto combine (Quality firstQuality, MoreQualities &&... moreQualities) noexcept -> Quality
 Picks the worse of a number of qualities.
 
constexpr auto isUsable (Quality quality) noexcept -> bool
 Determines if a quality is usable, i.e. if the corresponding value can be relied upon.
 
template<typename Error1 , typename Error2 >
constexpr auto selectError (Quality quality1, Error1 &&error1, Quality quality2, Error2 &&error2) -> std::common_type< Error1, Error2 >
 Selects one of two error messages depending on two corresponding qualities.
 
auto operator<< (std::ostream &stream, Quality quality) -> std::ostream &
 Stream insertion operator for qualities.
 
auto operator<< (utils::cbor::Encoder &encoder, Quality quality) -> utils::cbor::Encoder &
 Encodes a quality to a CBOR encoder.
 
auto operator>> (utils::cbor::Decoder &decoder, Quality &quality) -> utils::cbor::Decoder &
 Decodes a quality from a CBOR encoder.
 
template<class Type >
 FixedValue (Type) -> FixedValue< Type >
 Deduction guide for a fixed value passed by value.
 

Detailed Description

Functionality for accessing the value of Xentara attributes.

This namespace contains functionality used to read and write the values of Xentara attributes, including the values of data points.

Typedef Documentation

◆ NativeTypeToCppType

template<NativeType kNativeType, TypeUsage kUsage = TypeUsage::Get>
using xentara::data::NativeTypeToCppType = typedef typename __opaque_find_native_cpp_type__<kNativeType, kUsage>::type

The C++ type associated with a specific NativeType enum.

This type alias represents the C++ type associated with a particular NativeType value.

Special cases:

◆ PixelTypeToCppType

template<PixelType kPixelType>
using xentara::data::PixelTypeToCppType = typedef typename __opaque_find_pixel_cpp_type__<kPixelType>::type

The C++ type associated with a specific PixelType enum.

This type alias represents the C++ type associated with a particular PixelType value.

Template Parameters
kPixelTypeThe pixel type to use.
See also
cppTypeToPixelType()

◆ Qualities

A combination of different qualities.

Include file
#include <xentara/data/Quality.hpp>

Enumeration Type Documentation

◆ ColorDepth

enum class xentara::data::ColorDepth
strong

Colour depths for images.

Enumerator
Unsigned8Bit 

8-bit colour, stored as std::uint8_t

Unsigned10Bit 

10-bit colour, stored as std::uint16_t

Unsigned12Bit 

12-bit colour, stored as std::uint16_t

Unsigned16Bit 

16-bit colour, stored as std::uint16_t

Signed8Bit 

8-bit colour, stored as std::int8_t

Signed16Bit 

16-bit colour, stored as std::int16_t

Float32 

32-bit floating point colour, stored as float

Float64 

64-bit floating point colour, stored as double

◆ ColorSpace

enum class xentara::data::ColorSpace
strong

Colour spaces for images.

Enumerator
Mono 

Monochrome image.

Rgb 

RGB (red, green, blue) image.

Rgba 

RGB (red, green, blue) image with alpha channel.

PremultipliedRgba 

RGB (red, green, blue) image with premultiplied alpha channel.

Bgr 

BGR (blue, green, red) image.

Bgra 

BGR (blue, green, red) image with alpha channel.

PremultipliedBgra 

BGR (blue, green, red) image with premultiplied alpha channel.

Hsv 

HSV (hue, saturation, value) image.

Hls 

HLS (hue, lightness, saturation) image.

Hsv255 

8-bit HSV (hue, saturation, value) image, with hue ranging from 0 to 255 instead of 0 to 179

Hls255 

8-bit HLS (hue, lightness, saturation) image, with hue ranging from 0 to 255 instead of 0 to 179

Xyz 

CIE XYZ colour image.

Luv 

CIE L*u*v* image.

Lab 

CIE L*a*b* image.

YCrCb 

Y′CrCb (luma-chroma) image.

BayerBg 

Mosaic color image using Bayer blue-green (RGGB) pattern.

BayerGb 

Mosaic color image using Bayer green-blue (GRBG) pattern.

BayerRg 

Mosaic color image using Bayer red-green (BGGR) pattern.

BayerGr 

Mosaic color image using Bayer green-red (GBRG) pattern.

Yuv444 

Y′UV colour image with 4:4:4 chroma subsampling.

Yuv420sp_Nv12 

Y′UV colour image with 4:2:0 semi‑planar chroma subsampling in Cb-Cr order.

Yuv420sp_Nv21 

Y′UV colour image with 4:2:0 semi‑planar chroma subsampling in Cr-Cb order.

Yuv420p_I420 

Y′UV colour image with 4:2:0 fully planar chroma subsampling in Y-Cb-Cr order.

Yuv420p_Yv12 

Y′UV colour image with 4:2:0 fully planar chroma subsampling in Y-Cr-Cb order.

Yuv422_Uyvy 

Y′UV colour image with 4:2:2 packed chroma subsampling in Cb-Y-Cr-Y order.

Yuv422_Yuy2 

Y′UV colour image with 4:2:2 packed chroma subsampling in Y-Cb-Y-Cr order.

Yuv422_Yvyu 

Y′UV colour image with 4:2:2 packed chroma subsampling in Y-Cr-Y-Cb order.

◆ NativeType

enum class xentara::data::NativeType
strong

An enum describing different types of native C++ data used in read and write handles.

This enum provides a hint as to the best C++ data type to use when calling ReadHandle::read() or WriteHandle::write().

See also
ReadHandle
WriteHandle
Enumerator
Boolean 

The best C++ type is bool

Integer 

The best C++ type is std::intmax_t.

UnsignedInteger 

The best C++ type is std::uintmax_t.

FloatingPoint 

The best C++ type is double

String 

The best C++ type is std::string for reading and std::string_view for writing.

WString 

The best C++ type is std::wstring for reading and std::wstring_view for writing.

U8String 

The best C++ type is std::u8string for reading and std::u8string_view for writing.

U16String 

The best C++ type is std::u16string for reading and std::u16string_view for writing.

U32String 

The best C++ type is std::u32string for reading and std::u32string_view for writing.

Image 

The best C++ type is xentara::data::Image.

TimePoint 

The best C++ type is std::chrono::system_clock::time_point.

Uuid 

The best C++ type is xentara::utils::core::Uuid.

Quality 

The best C++ type is xentara::data::Quality.

ElementCategory 

The best C++ type is xentara::model::ElementCategory.

ErrorCode 

The best C++ type is std::error_code.

Custom 

The best C++ type is some custom type specific to some plugin.

This enum value denotes that the data is stored internally as some custom type specific to a plugin, like a custom enum type. 
None 

The handle is does not represent any data.

This type is used for error handles. Error handles are handles that never read or write any data, but always return an error
from [read()](@ref ReadHandle::read()) or [write(@ref ]WriteHandle::write()). 

◆ PixelType

enum class xentara::data::PixelType
strong

The C++ type used for the individual pixels in an image.

Enumerator
Uint8 

The pixels are stored as std::uint8_t.

Uint16 

The pixels are stored as std::uint16_t.

Int8 

The pixels are stored as std::int8_t.

Int16 

The pixels are stored as std::int16_t.

Float 

The pixels are stored as float.

Double 

The pixels are stored as double.

◆ Quality

enum class xentara::data::Quality : std::uint8_t
strong

A Quality for a data point value.

Include file
#include <xentara/data/Quality.hpp>
See also
Data Quality in the Xentara user manual
Enumerator
Good 

The value was successfully acquired.

Values with this quality have been acquired in the normal way without any errors or issues.

Acceptable 

The value was acquired in an acceptable way, but some problem occurred.

Values with this quality were acquired successfully, but may have reduced precision or accuracy. This may be due to using an alternate, inferior data source, to some non-critical error situation, or because a sensor or such is operating under conditions where the accuracy is reduced.

Values with quality Quality::Acceptable can still be used as inputs to control circuits, simulations, etc., but the results may not be as good as when using values with quality Quality::Good.

Calculated or derived values that are based on values with this quality should themselves not be flagged with a quality better than Quality::Acceptable.

Unreliable 

There was a problem acquiring the value, and it should not be relied upon.

Values with this quality can used for informational purposes, but are not reliable enough for system critical uses, such as control ciruits, safety systems, etc.

Calculated or derived values that are based on values with this quality should themselves not be flagged with a quality better than Quality::Unreliable.

Bad 

The value could not be acquired correctly.

Values with this quality either could not be acquired at all, or a serious error was encountered, like exceeding the range of a sensor.

Calculated or derived values that are based on values with this quality should themselves be flagged as Quality::Bad. Expensive operations, such as executing FMUs or AI models, can be skipped altogether, and some default or fallback value used as the output instead (also with quality Quality::Bad, of course).

◆ TypeUsage

enum class xentara::data::TypeUsage
strong

usage for a type when converting between NativeType and C++ types

Enumerator
Get 

The type is used to get a value from a producer.

Put 

The type is used to pass a value to a consumer.

Function Documentation

◆ channelCount()

constexpr auto xentara::data::channelCount ( ColorSpace  colorSpace) -> std::size_t
constexprnoexcept

Gets the number of channels in a colour space.

Include file
#include <xentara/data/ImageTypes.hpp>
Parameters
colorSpaceThe colour space
Returns
The channel count

◆ combine()

template<std::convertible_to< Quality >... MoreQualities>
constexpr auto xentara::data::combine ( Quality  firstQuality,
MoreQualities &&...  moreQualities 
) -> Quality
constexprnoexcept

Picks the worse of a number of qualities.

Include file
#include <xentara/data/Quality.hpp>
Parameters
firstQualityThe first quality to consider
moreQualitiesAny number of additional qualities to consider
Returns
The worst of all the qualities.

◆ cppTypeToNativeType()

template<typename CppType >
constexpr auto xentara::data::cppTypeToNativeType ( TypeUsage  usage = TypeUsage::Put) -> NativeType
constexprnoexcept

Find the correct NativeType enum to use for a C++ type.

This function returns the NativeType value that is used for a specific C++ type.

This template is available for all C++ types, not only the canonical native C++ type, as returned by NativeTypeToCppType. For non-canonical types, the function will return the best fitting native type.

If no suitable standard NativeType value is exists, then the function will return value NativeType::Custom.

Template Parameters
CppType

The C++ type to convert. References and cv-qualifiers are removed using std::remove_cvref before checking the type.

The type is not limited to the canonical native C++ type, as returned by NativeTypeToCppType, any C++ type can be used, and the best fitting NativeType value will be returned.

Parameters
usage

The usage for the C++ type. Specify TypeUsage::Get if you are reading the value from producer, and TypeUsage::Put if you are writing the value to a consumer. This will affect some types:

Returns
The best fitting native type, or NativeType::Custom if no suitable native type is found.
See also
NativeTypeToCppType

◆ cppTypeToPixelType()

template<typename CppType >
requires PixelCppType<std::remove_cvref_t<CppType>>
constexpr auto xentara::data::cppTypeToPixelType ( ) -> PixelType
constexprnoexcept

Find the correct PixelType enum to use for a C++ type.

This function returns the PixelType value that is used for a specific C++ type.

Note
This template is only available for the supported C++ types.
Template Parameters
CppTypeThe C++ type to convert. References and cv-qualifiers are removed using std::remove_cvref before checking the type.
Returns
The corresponding pixel type.
See also
PixelTypeToCppType

◆ FixedValue()

template<class Type >
xentara::data::FixedValue ( Type  ) -> FixedValue< Type >

Deduction guide for a fixed value passed by value.

◆ isBetter()

constexpr auto xentara::data::isBetter ( Quality  quality,
Quality  referenceQuality 
) -> bool
constexprnoexcept

Determines if one quality is better than another quality.

Include file
#include <xentara/data/Quality.hpp>
Parameters
qualityThe quality value to check
referenceQualityThe quality value to compare with
Returns
Returns true if quality is better than referenceQuality

◆ isUsable()

constexpr auto xentara::data::isUsable ( Quality  quality) -> bool
constexprnoexcept

Determines if a quality is usable, i.e. if the corresponding value can be relied upon.

Include file
#include <xentara/data/Quality.hpp>
Parameters
qualityThe quality value to check
Returns
Returns true if quality is Quality::Good or Quality::Acceptable.

◆ isWorse()

constexpr auto xentara::data::isWorse ( Quality  quality,
Quality  referenceQuality 
) -> bool
constexprnoexcept

Determines if one quality is worse than another quality.

Include file
#include <xentara/data/Quality.hpp>
Parameters
qualityThe quality value to check
referenceQualityThe quality value to compare with
Returns
Returns true if quality is worse than referenceQuality

◆ operator<<() [1/4]

auto xentara::data::operator<< ( std::ostream &  stream,
ColorDepth  colorDepth 
) -> std::ostream &

Stream insertion operator for target color depths.

Include file
#include <xentara/data/ImageTypes.hpp>
Parameters
streamThe stream
colorDepthThe colour depth
Returns
The stream

◆ operator<<() [2/4]

auto xentara::data::operator<< ( std::ostream &  stream,
ColorSpace  colorSpace 
) -> std::ostream &

Stream insertion operator for color space values.

Include file
#include <xentara/data/ImageTypes.hpp>
Parameters
streamThe stream
colorSpaceThe colour space value
Returns
The stream

◆ operator<<() [3/4]

auto xentara::data::operator<< ( std::ostream &  stream,
Quality  quality 
) -> std::ostream &

Stream insertion operator for qualities.

Include file
#include <xentara/data/Quality.hpp>
Parameters
streamThe stream
qualityThe quality value
Returns
The stream

◆ operator<<() [4/4]

auto xentara::data::operator<< ( utils::cbor::Encoder &  encoder,
Quality  quality 
) -> utils::cbor::Encoder &

Encodes a quality to a CBOR encoder.

Include file
#include <xentara/data/Quality.hpp>
Parameters
encoderThe encoder
qualityThe quality
Returns
A reference to the encoder

◆ operator>>()

auto xentara::data::operator>> ( utils::cbor::Decoder &  decoder,
Quality &  quality 
) -> utils::cbor::Decoder &

Decodes a quality from a CBOR encoder.

Include file
#include <xentara/data/Quality.hpp>
Parameters
decoderThe decoder
qualityThe quality
Returns
A reference to the decoder

◆ pixelType()

constexpr auto xentara::data::pixelType ( ColorDepth  colorDepth) -> PixelType
constexprnoexcept

Gets the pixel type for a colour depth.

Include file
#include <xentara/data/ImageTypes.hpp>
Parameters
colorDepthThe colour depth
Returns
The pixel storage type.

◆ selectError()

template<typename Error1 , typename Error2 >
constexpr auto xentara::data::selectError ( Quality  quality1,
Error1 &&  error1,
Quality  quality2,
Error2 &&  error2 
) -> std::common_type<Error1, Error2>
constexpr

Selects one of two error messages depending on two corresponding qualities.

Include file
#include <xentara/data/Quality.hpp>
Parameters
quality1The quality that corresponds to error1
error1The error that corresponds to quality1
quality2The quality that corresponds to error2
error2The error that corresponds to quality2
Returns
Returns error2 if quality2 is worse than quality1, otherwise returns error1.

◆ toBasicString() [1/3]

template<utils::tools::CharType Char>
auto xentara::data::toBasicString ( ColorDepth  colorDepth) -> std::basic_string_view<Char>

Converts a colour depth to a string.

Include file
#include <xentara/data/ImageTypes.hpp>
Parameters
colorDepthThe colour depth
Returns
A string containing the colour depth as text

◆ toBasicString() [2/3]

template<utils::tools::CharType Char>
auto xentara::data::toBasicString ( ColorSpace  colorSpace) -> std::basic_string_view<Char>

Converts a colour space value to a string.

Include file
#include <xentara/data/ImageTypes.hpp>
Parameters
colorSpaceThe colour space value
Returns
A string containing the name of the colour space

◆ toBasicString() [3/3]

template<utils::tools::CharType Char>
auto xentara::data::toBasicString ( Quality  quality) -> std::basic_string_view<Char>

Converts a quality value to a string.

Include file
#include <xentara/data/Quality.hpp>
Parameters
qualityThe quality value
Returns
A string containing the quality as a UTF-8 text

◆ toString() [1/3]

auto xentara::data::toString ( ColorDepth  colorDepth) -> std::string_view

Converts a colour depth to a string of type char

Include file
#include <xentara/data/ColorDepth.hpp>
Parameters
colorDepthThe colour depth
Returns
A string containing the colour depth as text

◆ toString() [2/3]

auto xentara::data::toString ( ColorSpace  colorSpace) -> std::string_view

Converts a colour space value to a string of type char

Include file
#include <xentara/data/ImageTypes.hpp>
Parameters
colorSpaceThe colour space value
Returns
A string containing the name of the colour space

◆ toString() [3/3]

auto xentara::data::toString ( Quality  quality) -> std::string_view

Converts a quality value to a string of type char

Include file
#include <xentara/data/Quality.hpp>
Parameters
qualityThe quality value
Returns
A string containing the quality

◆ toU16String() [1/3]

auto xentara::data::toU16String ( ColorDepth  colorDepth) -> std::u16string_view

Converts a colour depth to a string of type char16_t

Include file
#include <xentara/data/ColorDepth.hpp>
Parameters
colorDepthThe colour depth
Returns
A string containing the colour depth as text

◆ toU16String() [2/3]

auto xentara::data::toU16String ( ColorSpace  colorSpace) -> std::u16string_view

Converts a colour space value to a string of type char16_t

Include file
#include <xentara/data/ImageTypes.hpp>
Parameters
colorSpaceThe colour space value
Returns
A string containing the name of the colour space

◆ toU16String() [3/3]

auto xentara::data::toU16String ( Quality  quality) -> std::u16string_view

Converts a quality value to a string of type char16_t

Include file
#include <xentara/data/Quality.hpp>
Parameters
qualityThe quality value
Returns
A string containing the quality

◆ toU32String() [1/3]

auto xentara::data::toU32String ( ColorDepth  colorDepth) -> std::u32string_view

Converts a colour depth to a string of type char32_t

Include file
#include <xentara/data/ColorDepth.hpp>
Parameters
colorDepthThe colour depth
Returns
A string containing the colour depth as text

◆ toU32String() [2/3]

auto xentara::data::toU32String ( ColorSpace  colorSpace) -> std::u32string_view

Converts a colour space value to a string of type char32_t

Include file
#include <xentara/data/ImageTypes.hpp>
Parameters
colorSpaceThe colour space value
Returns
A string containing the name of the colour space

◆ toU32String() [3/3]

auto xentara::data::toU32String ( Quality  quality) -> std::u32string_view

Converts a number to a string of type char32_t

Include file
#include <xentara/data/Quality.hpp>
Parameters
qualityThe quality value
Returns
A string containing the quality

◆ toU8String() [1/3]

auto xentara::data::toU8String ( ColorDepth  colorDepth) -> std::u8string_view

Converts a colour depth to a string of type char8_t

Include file
#include <xentara/data/ColorDepth.hpp>
Parameters
colorDepthThe colour depth
Returns
A string containing the colour depth as text

◆ toU8String() [2/3]

auto xentara::data::toU8String ( ColorSpace  colorSpace) -> std::u8string_view

Converts a colour space value to a string of type char8_t

Include file
#include <xentara/data/ImageTypes.hpp>
Parameters
colorSpaceThe colour space value
Returns
A string containing the name of the colour space

◆ toU8String() [3/3]

auto xentara::data::toU8String ( Quality  quality) -> std::u8string_view

Converts a quality value to a string of type char8_t

Include file
#include <xentara/data/Quality.hpp>
Parameters
qualityThe quality value
Returns
A string containing the quality

◆ toWString() [1/3]

auto xentara::data::toWString ( ColorDepth  colorDepth) -> std::wstring_view

Converts a colour depth to a string of type wchar_t

Include file
#include <xentara/data/ColorDepth.hpp>
Parameters
colorDepthThe colour depth
Returns
A string containing the colour depth as text

◆ toWString() [2/3]

auto xentara::data::toWString ( ColorSpace  colorSpace) -> std::wstring_view

Converts a colour space value to a string of type wchar_t

Include file
#include <xentara/data/ImageTypes.hpp>
Parameters
colorSpaceThe colour space value
Returns
A string containing the name of the colour space

◆ toWString() [3/3]

auto xentara::data::toWString ( Quality  quality) -> std::wstring_view

Converts a quality value to a string of type wchar_t

Include file
#include <xentara/data/Quality.hpp>
Parameters
qualityThe quality value
Returns
A string containing the quality