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

Handle to an owned sharedObject. More...

Inheritance diagram for SDL::SharedObject:
Inheritance graph
[legend]

Public Member Functions

constexpr SharedObject (SDL_SharedObject *resource={})
 Constructs from the underlying resource.
 
constexpr SharedObject (const SharedObject &other)=delete
 
constexpr SharedObject (SharedObject &&other)=default
 Move constructor.
 
 ~SharedObject ()
 Frees up resource when object goes out of scope.
 
SharedObjectoperator= (SharedObject other)
 Assignment operator.
 
constexpr SharedObjectRef (const SharedObjectRef &other)
 Copy constructor.
 
constexpr SharedObjectRef (SharedObjectRef &&other)
 Move constructor.
 
- Public Member Functions inherited from SDL::SharedObjectRef
constexpr SharedObjectRef (const SharedObjectRef &other)
 Copy constructor.
 
constexpr SharedObjectRef (SharedObjectRef &&other)
 Move constructor.
 
constexpr ~SharedObjectRef ()=default
 Default constructor.
 
SharedObjectRefoperator= (SharedObjectRef other)
 Assignment operator.
 
void reset (SDL_SharedObject *newResource={})
 Unload a shared object from memory.
 
void Unload ()
 Unload a shared object from memory.
 
 SharedObjectBase (StringParam sofile)
 Dynamically load a shared object.
 
- Public Member Functions inherited from SDL::SharedObjectBase
 SharedObjectBase (StringParam sofile)
 Dynamically load a shared object.
 
FunctionPointer LoadFunction (StringParam name)
 Look up the address of the named function in a shared object.
 
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
 
- Public Member Functions inherited from SDL::Resource< SDL_SharedObject * >
constexpr Resource (SDL_SharedObject * 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
 
Resourceoperator= (const Resource &other)=delete
 
Resourceoperator= (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_SharedObject * get () const
 Return contained resource;.
 
constexpr SDL_SharedObject * release (SDL_SharedObject * newResource={})
 Return contained resource and empties or replace value.
 
constexpr const SDL_SharedObject * operator-> () const
 Access to fields.
 
constexpr SDL_SharedObject * operator-> ()
 Access to fields.
 

Detailed Description

Category:
Resource
See also
SharedObjectBase
SharedObjectRef

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