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

Semi-safe reference for Properties.

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

Public Member Functions

 PropertiesRef (PropertiesParam resource) noexcept
 Constructs from PropertiesParam. More...
 
 PropertiesRef (PropertiesID resource) noexcept
 Constructs from PropertiesParam. More...
 
 PropertiesRef (const PropertiesRef &other) noexcept
 Copy constructor.
 
 ~PropertiesRef ()
 Destructor.
 
constexpr Properties (std::nullptr_t=nullptr) noexcept
 Default ctor.
 
constexpr Properties (const PropertiesID resource) noexcept
 Constructs from PropertiesParam. More...
 
constexpr Properties (const Properties &other)=delete
 Copy constructor.
 
constexpr Properties (Properties &&other) noexcept
 Move constructor.
 
constexpr Properties (const PropertiesRef &other)=delete
 
constexpr Properties (PropertiesRef &&other)=delete
 
- Public Member Functions inherited from SDL::Properties
constexpr Properties (std::nullptr_t=nullptr) noexcept
 Default ctor.
 
constexpr Properties (const PropertiesID resource) noexcept
 Constructs from PropertiesParam. More...
 
constexpr Properties (const Properties &other)=delete
 Copy constructor.
 
constexpr Properties (Properties &&other) noexcept
 Move constructor.
 
constexpr Properties (const PropertiesRef &other)=delete
 
constexpr Properties (PropertiesRef &&other)=delete
 
 ~Properties ()
 Destructor.
 
constexpr Propertiesoperator= (Properties &&other) noexcept
 Assignment operator.
 
constexpr PropertiesID get () const noexcept
 Retrieves underlying PropertiesID.
 
constexpr PropertiesID release () noexcept
 Retrieves underlying PropertiesID and clear this.
 
constexpr auto operator<=> (const Properties &other) const noexcept=default
 Comparison.
 
constexpr operator bool () const noexcept
 Converts to bool.
 
constexpr operator PropertiesParam () const noexcept
 Converts to PropertiesParam.
 
void Destroy ()
 Destroy a group of properties. More...
 
void Copy (PropertiesParam dst)
 Copy a group of properties. More...
 
void Lock ()
 Lock a group of properties. More...
 
void Unlock ()
 Unlock a group of properties. More...
 
void SetPointerPropertyWithCleanup (StringParam name, void *value, CleanupPropertyCallback cleanup, void *userdata)
 Set a pointer property in a group of properties with a cleanup function that is called when the property is deleted. More...
 
void SetPointerPropertyWithCleanup (StringParam name, void *value, CleanupPropertyCB cleanup)
 Set a pointer property in a group of properties with a cleanup function that is called when the property is deleted. More...
 
void SetPointerProperty (StringParam name, void *value)
 Set a pointer property in a group of properties. More...
 
void SetStringProperty (StringParam name, StringParam value)
 Set a string property in a group of properties. More...
 
void SetNumberProperty (StringParam name, Sint64 value)
 Set an integer property in a group of properties. More...
 
void SetFloatProperty (StringParam name, float value)
 Set a floating point property in a group of properties. More...
 
void SetBooleanProperty (StringParam name, bool value)
 Set a boolean property in a group of properties. More...
 
bool HasProperty (StringParam name)
 Return whether a property exists in a group of properties. More...
 
PropertyType GetPropertyType (StringParam name)
 Get the type of a property in a group of properties. More...
 
void * GetPointerProperty (StringParam name, void *default_value)
 Get a pointer property from a group of properties. More...
 
const char * GetStringProperty (StringParam name, StringParam default_value)
 Get a string property from a group of properties. More...
 
Sint64 GetNumberProperty (StringParam name, Sint64 default_value)
 Get a number property from a group of properties. More...
 
float GetFloatProperty (StringParam name, float default_value)
 Get a floating point property from a group of properties. More...
 
bool GetBooleanProperty (StringParam name, bool default_value)
 Get a boolean property from a group of properties. More...
 
void ClearProperty (StringParam name)
 Clear a property from a group of properties. More...
 
void Enumerate (EnumeratePropertiesCallback callback, void *userdata)
 Enumerate the properties contained in a group of properties. More...
 
void Enumerate (EnumeratePropertiesCB callback)
 Enumerate the properties contained in a group of properties. More...
 
Uint64 GetCount ()
 Returns the number of properties this has. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from SDL::Properties
static Properties Create ()
 Create a group of properties. More...
 
- Protected Member Functions inherited from SDL::Properties
constexpr Propertiesoperator= (const Properties &other) noexcept=default
 Assignment operator.
 

Constructor & Destructor Documentation

◆ PropertiesRef() [1/2]

SDL::PropertiesRef::PropertiesRef ( PropertiesParam  resource)
inlinenoexcept
Parameters
resourcea PropertiesID or Properties.

This does not takes ownership!

◆ PropertiesRef() [2/2]

SDL::PropertiesRef::PropertiesRef ( PropertiesID  resource)
inlinenoexcept
Parameters
resourcea PropertiesID or Properties.

This does not takes ownership!

Member Function Documentation

◆ Properties()

constexpr SDL::Properties::Properties ( const PropertiesID  resource)
inlineexplicitconstexprnoexcept
Parameters
resourcea PropertiesID to be wrapped.

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


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