SDL3pp
A slim C++ wrapper for SDL3
|
The opaque structure used to identify an opened SDL sensor. More...
Public Member Functions | |
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. | |
Sensor & | operator= (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... | |
|
inlineexplicitconstexpr |
resource | a SensorRaw to be wrapped. |
This assumes the ownership, call release() if you need to take back.
|
inline |
instance_id | the sensor instance ID. |