SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
SDL::Properties Struct Reference

An ID that represents a properties set. More...

Inheritance diagram for SDL::Properties:
[legend]

Public Member Functions

constexpr Properties (PropertiesID resource) noexcept
 Constructs from raw Properties.
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.
Propertiesoperator= (const Properties &other)=delete
 Assignment operator.
void Destroy ()
 Destroy a group of properties.
void Copy (PropertiesRef dst)
 Copy a group of properties.
PropertiesLock Lock ()
 Lock a group of properties.
void Unlock (PropertiesLock &&lock)
 Unlock a group of properties.
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.
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.
void SetPointerProperty (StringParam name, void *value)
 Set a pointer property in a group of properties.
void SetStringProperty (StringParam name, StringParam value)
 Set a string property in a group of properties.
void SetNumberProperty (StringParam name, Sint64 value)
 Set an integer property in a group of properties.
void SetFloatProperty (StringParam name, float value)
 Set a floating point property in a group of properties.
void SetBooleanProperty (StringParam name, bool value)
 Set a boolean property in a group of properties.
bool HasProperty (StringParam name)
 Return whether a property exists in a group of properties.
PropertyType GetPropertyType (StringParam name)
 Get the type of a property in a group of properties.
void * GetPointerProperty (StringParam name, void *default_value)
 Get a pointer property from a group of properties.
const char * GetStringProperty (StringParam name, StringParam default_value)
 Get a string property from a group of properties.
Sint64 GetNumberProperty (StringParam name, Sint64 default_value)
 Get a number property from a group of properties.
float GetFloatProperty (StringParam name, float default_value)
 Get a floating point property from a group of properties.
bool GetBooleanProperty (StringParam name, bool default_value)
 Get a boolean property from a group of properties.
void ClearProperty (StringParam name)
 Clear a property from a group of properties.
void Enumerate (EnumeratePropertiesCallback callback, void *userdata)
 Enumerate the properties contained in a group of properties.
void Enumerate (EnumeratePropertiesCB callback)
 Enumerate the properties contained in a group of properties.
Uint64 GetCount ()
 Returns the number of properties this has.
constexpr ResourceBase (RawPointer resource)
 Constructs from resource pointer.
constexpr ResourceBase (std::nullptr_t=nullptr)
 Constructs null/invalid.
Public Member Functions inherited from SDL::ResourceBase< PropertiesID >
constexpr ResourceBase (RawPointer resource)
 Constructs from resource pointer.
constexpr operator bool () const
 Converts to bool.
constexpr auto operator<=> (const ResourceBase &other) const=default
 Comparison.
constexpr RawConstPointer operator-> () const noexcept
 member access to underlying resource pointer.
constexpr RawPointer get () const noexcept
 Retrieves underlying resource pointer.
constexpr RawPointer release () noexcept
 Retrieves underlying resource pointer and clear this.

Static Public Member Functions

static Properties Create ()
 Create a group of properties.

Additional Inherited Members

Public Types inherited from SDL::ResourceBase< PropertiesID >
using RawPointer
 The underlying raw pointer type.
using RawConstPointer
 The underlying const raw pointer type.

Detailed Description

An ID that represents a properties set.

Since
This datatype is available since SDL 3.2.0.
Category:
Resource
See also
Properties.Create
prop

Constructor & Destructor Documentation

◆ Properties()

SDL::Properties::Properties ( PropertiesID resource)
inlineexplicitconstexprnoexcept

Constructs from raw Properties.

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: