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

Semi-safe reference for IConv.

Inheritance diagram for SDL::IConvRef:
Inheritance graph
[legend]
Collaboration diagram for SDL::IConvRef:
Collaboration graph
[legend]

Public Member Functions

 IConvRef (IConvParam resource) noexcept
 Constructs from IConvParam. More...
 
 IConvRef (IConvRaw resource) noexcept
 Constructs from IConvParam. More...
 
constexpr IConvRef (const IConvRef &other) noexcept=default
 Copy constructor.
 
 ~IConvRef ()
 Destructor.
 
constexpr IConv (std::nullptr_t=nullptr) noexcept
 Default ctor.
 
constexpr IConv (const IConvRaw resource) noexcept
 Constructs from IConvParam. More...
 
constexpr IConv (const IConv &other) noexcept=default
 Copy constructor.
 
constexpr IConv (IConv &&other) noexcept
 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...
 
- Public Member Functions inherited from SDL::IConv
constexpr IConv (std::nullptr_t=nullptr) noexcept
 Default ctor.
 
constexpr IConv (const IConvRaw resource) noexcept
 Constructs from IConvParam. More...
 
constexpr IConv (IConv &&other) noexcept
 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.
 
constexpr IConvoperator= (IConv &&other) noexcept
 Assignment operator.
 
constexpr IConvRaw get () const noexcept
 Retrieves underlying IConvRaw.
 
constexpr IConvRaw release () noexcept
 Retrieves underlying IConvRaw and clear this.
 
constexpr auto operator<=> (const IConv &other) const noexcept=default
 Comparison.
 
 operator bool () const noexcept
 Converts to bool.
 
constexpr operator IConvParam () const noexcept
 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...
 

Additional Inherited Members

- Protected Member Functions inherited from SDL::IConv
constexpr IConv (const IConv &other) noexcept=default
 Copy constructor.
 
constexpr IConvoperator= (const IConv &other) noexcept=default
 Assignment operator.
 

Constructor & Destructor Documentation

◆ IConvRef() [1/2]

SDL::IConvRef::IConvRef ( IConvParam  resource)
inlinenoexcept
Parameters
resourcea IConvRaw or IConv.

This does not takes ownership!

◆ IConvRef() [2/2]

SDL::IConvRef::IConvRef ( IConvRaw  resource)
inlinenoexcept
Parameters
resourcea IConvRaw or IConv.

This does not takes ownership!

Member Function Documentation

◆ IConv() [1/2]

constexpr SDL::IConv::IConv ( const IConvRaw  resource)
inlineexplicitconstexprnoexcept
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 struct was generated from the following file: