SDL3pp
A slim C++ wrapper for SDL3
|
Handle to a non owned properties. More...
Public Member Functions | |
constexpr | PropertiesRef (const PropertiesRef &other) |
Copy constructor. | |
constexpr | PropertiesRef (PropertiesRef &&other) |
Move constructor. | |
constexpr | ~PropertiesRef ()=default |
Default constructor. | |
PropertiesRef & | operator= (PropertiesRef other) |
Assignment operator. | |
void | reset (SDL_PropertiesID newResource={}) |
Destroy a group of properties. | |
![]() | |
void | CopyPropertiesTo (PropertiesBase &dst) const |
Copy a group of properties. | |
PropertiesLock | Lock () & |
Lock a group of properties. | |
void | SetPointerWithCleanup (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. | |
void | SetPointerWithCleanup (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. | |
void | SetPointer (StringParam name, void *value) |
Set a pointer property in a group of properties. | |
void | SetString (StringParam name, StringParam value) |
Set a string property in a group of properties. | |
void | SetNumber (StringParam name, Sint64 value) |
Set an integer property in a group of properties. | |
void | SetFloat (StringParam name, float value) |
Set a floating point property in a group of properties. | |
void | SetBoolean (StringParam name, bool value) |
Set a boolean property in a group of properties. | |
bool | Has (StringParam name) const |
Return whether a property exists in a group of properties. | |
PropertyType | GetType (StringParam name) const |
Get the type of a property. | |
void * | GetPointer (StringParam name, void *default_value) const |
Get a pointer property from a group of properties. | |
const char * | GetString (StringParam name, StringParam default_value) const |
Get a string property from a group of properties. | |
Sint64 | GetNumber (StringParam name, Sint64 default_value) const |
Get a number property from a group of properties. | |
float | GetFloat (StringParam name, float default_value) const |
Get a floating point property from a group of properties. | |
bool | GetBoolean (StringParam name, bool default_value) const |
Get a boolean property from a group of properties. | |
void | Clear (StringParam name) |
Clear a property from a group of properties. | |
template<std::output_iterator< const char * > IT> | |
void | Enumerate (IT outputIter) const |
Enumerate the properties contained in a group of properties. | |
void | Enumerate (EnumeratePropertiesCB callback) const |
Enumerate the properties contained in a group of properties. | |
void | Enumerate (EnumeratePropertiesCallback callback, void *userdata) const |
Enumerate the properties contained in a group of properties. | |
Uint64 | GetCount () const |
Returns the number of properties this has. | |
constexpr | Resource (T resource={}) |
Constructs the underlying resource. | |
constexpr | Resource (std::nullptr_t) |
Equivalent to default ctor. | |
constexpr | Resource (std::nullopt_t) |
Equivalent to default ctor. | |
Resource (const Resource &other)=delete | |
Resource (Resource &&other)=delete | |
![]() | |
constexpr | Resource (SDL_PropertiesID resource={}) |
Constructs the underlying resource. | |
constexpr | Resource (std::nullptr_t) |
Equivalent to default ctor. | |
constexpr | Resource (std::nullopt_t) |
Equivalent to default ctor. | |
Resource (const Resource &other)=delete | |
Resource (Resource &&other)=delete | |
Resource & | operator= (const Resource &other)=delete |
Resource & | operator= (Resource &&other)=delete |
constexpr | operator bool () const |
True if contains a valid resource. | |
constexpr bool | operator== (const Resource &other) const=default |
Comparison. | |
constexpr bool | operator== (std::nullopt_t) const |
Comparison. | |
constexpr bool | operator== (std::nullptr_t) const |
Comparison. | |
constexpr SDL_PropertiesID | get () const |
Return contained resource;. | |
constexpr SDL_PropertiesID | release (SDL_PropertiesID newResource={}) |
Return contained resource and empties or replace value. | |
constexpr const SDL_PropertiesID | operator-> () const |
Access to fields. | |
constexpr SDL_PropertiesID | operator-> () |
Access to fields. | |
|
inline |
All properties are deleted and their cleanup functions will be called, if any.