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

Semi-safe reference for Sensor.

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

Public Member Functions

 SensorRef (SensorParam resource)
 Constructs from SensorParam. More...
 
 SensorRef (const SensorRef &other)
 Copy constructor.
 
 ~SensorRef ()
 Destructor.
 
- Public Member Functions inherited from SDL::Sensor
constexpr Sensor ()=default
 Default ctor.
 
constexpr Sensor (const SensorRaw resource)
 Constructs from SensorParam. More...
 
constexpr Sensor (const Sensor &other)=delete
 Copy constructor.
 
constexpr Sensor (Sensor &&other)
 Move constructor.
 
constexpr Sensor (const SensorRef &other)=delete
 
constexpr Sensor (SensorRef &&other)=delete
 
 Sensor (SensorID instance_id)
 Open a sensor for use. More...
 
 ~Sensor ()
 Destructor.
 
Sensoroperator= (Sensor other)
 Assignment operator.
 
constexpr SensorRaw get () const
 Retrieves underlying SensorRaw.
 
constexpr SensorRaw release ()
 Retrieves underlying SensorRaw and clear this.
 
constexpr auto operator<=> (const Sensor &other) const =default
 Comparison.
 
constexpr bool operator== (std::nullptr_t _) const
 Comparison.
 
constexpr operator bool () const
 Converts to bool.
 
constexpr operator SensorParam () const
 Converts to SensorParam.
 
void Close ()
 Close a sensor previously opened with Sensor.Sensor(). More...
 
PropertiesRef GetProperties ()
 Get the properties associated with a sensor. More...
 
const char * GetName ()
 Get the implementation dependent name of a sensor. More...
 
SensorType GetType ()
 Get the type of a sensor. More...
 
int GetNonPortableType ()
 Get the platform dependent type of a sensor. More...
 
SensorID GetID ()
 Get the instance ID of a sensor. More...
 
void GetData (float *data, int num_values)
 Get the current state of an opened sensor. More...
 

Constructor & Destructor Documentation

◆ SensorRef()

SDL::SensorRef::SensorRef ( SensorParam  resource)
inline
Parameters
resourcea SensorRaw or Sensor.

This does not takes ownership!


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