SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches

Source byte stream. More...

Public Member Functions

constexpr SourceBytes ()=default
 Default ctor.
constexpr SourceBytes (std::nullptr_t)
 Disambiguate between multiple pointer types.
template<class T, size_t N>
constexpr SourceBytes (std::span< T, N > span)
 From span.
template<class T>
constexpr SourceBytes (const T &data)
 From container-like.
template<class T, size_t N>
constexpr SourceBytes (T(&data)[N])
 From array.
constexpr SourceBytes (const void *data, size_t size_bytes)
 From data + size in bytes.
constexpr size_t size () const
 Retrieves contained size.
constexpr size_t size_bytes () const
 Retrieves contained size in bytes.
constexpr const char * data () const
 Retrieves contained data.
template<class T>
constexpr const T * data_as () const
 Retrieves contained data.

Detailed Description

Source byte stream.

Source byte stream, tipically used as source where bytes are copied from.

Constructor & Destructor Documentation

◆ SourceBytes() [1/4]

template<class T, size_t N>
SDL::SourceBytes::SourceBytes ( std::span< T, N > span)
inlineconstexpr

From span.

Parameters
spanthe data.

◆ SourceBytes() [2/4]

template<class T>
SDL::SourceBytes::SourceBytes ( const T & data)
inlineconstexpr

From container-like.

Parameters
datathe data.

◆ SourceBytes() [3/4]

template<class T, size_t N>
SDL::SourceBytes::SourceBytes ( T(&) data[N])
inlineconstexpr

From array.

Parameters
datathe data.

◆ SourceBytes() [4/4]

SDL::SourceBytes::SourceBytes ( const void * data,
size_t size_bytes )
inlineconstexpr

From data + size in bytes.

Parameters
datathe data.
size_bytessize in bytes!

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