SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
Public Member Functions | List of all members

An opaque handle representing string encoding conversion state. More...

Inheritance diagram for SDL::IConv:
Inheritance graph
[legend]

Public Member Functions

constexpr IConv ()=default
 Default ctor.
 
constexpr IConv (const IConvRaw resource)
 Constructs from IConvParam. More...
 
constexpr IConv (const IConv &other)=delete
 Copy constructor.
 
constexpr IConv (IConv &&other)
 Move constructor.
 
constexpr IConv (const IConvRef &other)=delete
 
constexpr IConv (IConvRef &&other)=delete
 
 IConv (StringParam tocode, StringParam fromcode)
 This function allocates a context for the specified character set conversion. More...
 
 ~IConv ()
 Destructor.
 
IConvoperator= (IConv other)
 Assignment operator.
 
constexpr IConvRaw get () const
 Retrieves underlying IConvRaw.
 
constexpr IConvRaw release ()
 Retrieves underlying IConvRaw and clear this.
 
constexpr auto operator<=> (const IConv &other) const =default
 Comparison.
 
constexpr bool operator== (std::nullptr_t _) const
 Comparison.
 
constexpr operator bool () const
 Converts to bool.
 
constexpr operator IConvParam () const
 Converts to IConvParam.
 
int close ()
 This function frees a context used for character set conversion. More...
 
size_t iconv (const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
 This function converts text between encodings, reading from and writing to a buffer. More...
 

Detailed Description

Since
This datatype is available since SDL 3.2.0.
Category:
Resource
See also
IConv.open
IConv

Constructor & Destructor Documentation

◆ IConv() [1/2]

constexpr SDL::IConv::IConv ( const IConvRaw  resource)
inlineexplicitconstexpr
Parameters
resourcea IConvRaw to be wrapped.

This assumes the ownership, call release() if you need to take back.

◆ IConv() [2/2]

SDL::IConv::IConv ( StringParam  tocode,
StringParam  fromcode 
)
inline
Parameters
tocodeThe target character encoding, must not be nullptr.
fromcodeThe source character encoding, must not be nullptr.
Postcondition
a valid handle or falsy on failure.
Since
This function is available since SDL 3.2.0.
See also
IConv.iconv
IConv.close
iconv_string

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