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

Base class to Properties. More...

Inheritance diagram for SDL::PropertiesBase:
[legend]

Public Member Functions

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 ResourceBaseT ()=default
 Default constructor, creates null/invalid resource.
constexpr ResourceBaseT (RawPointer resource)
 Constructs from resource pointer.
constexpr ResourceBaseT (std::nullptr_t)
 Constructs null/invalid.
constexpr ResourceBaseT (const ResourceBaseT &)=default
 Copy constructor.
constexpr ResourceBaseT (ResourceBaseT &&) noexcept=default
 Move constructor.
Public Member Functions inherited from SDL::ResourceBaseT< PropertiesID >
constexpr ResourceBaseT ()=default
 Default constructor, creates null/invalid resource.
constexpr operator bool () const
 Converts to bool.
constexpr auto operator<=> (const ResourceBaseT &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.

Additional Inherited Members

Public Types inherited from SDL::ResourceBaseT< PropertiesID >
using RawPointer
 The underlying raw pointer type.
using RawConstPointer
 The underlying const raw pointer type.
Protected Member Functions inherited from SDL::ResourceBaseT< PropertiesID >
constexpr ~ResourceBaseT ()=default
 Destructor.
constexpr ResourceBaseToperator= (const ResourceBaseT &)=default
 Assignment operator.

Detailed Description

Base class to Properties.

See also
Properties

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