{
DSInputPrivate::DSInputPrivate(DSInput * p_ptr)
- : DSObjectPrivate(p_ptr)
+ : DSObjectPrivate(p_ptr),
+ __p_ptr(p_ptr)
{
}
}
DSInput::DSInput()
- : DSObject(std::make_unique<DSInputPrivate>(this))
+ : DS_INIT_PRIVATE_PTR(DSInput)
{
}
{
}
-
DSInputDevice::DSInputDevice()
: __deviceName(nullptr),
__deviceIdentifier(nullptr),
{
}
-DSInputDevice::DSInputDevice(string name, string identifier, DSInput::DeviceClass clas)
+DSInputDevice::DSInputDevice(std::string name, std::string identifier, DSInput::DeviceClass clas)
: __deviceName(name),
__deviceIdentifier(identifier),
__deviceClass(clas)
{
}
-string DSInputDevice::getName() const
+std::string DSInputDevice::getName() const
{
return __deviceName;
}
-void DSInputDevice::setName(string name)
+void DSInputDevice::setName(std::string name)
{
__deviceName = name;
}
-string DSInputDevice::getIdentifier() const
+std::string DSInputDevice::getIdentifier() const
{
return __deviceIdentifier;
}
-void DSInputDevice::setIdentifier(string identifier)
+void DSInputDevice::setIdentifier(std::string identifier)
{
__deviceIdentifier = identifier;
}
#ifndef _DSINPUT_H_
#define _DSINPUT_H_
-#include <DSObject.h>
-#include <iostream>
-#include <string>
-
-using namespace std;
+#include "DSCore.h"
+#include "DSObject.h"
namespace display_server
{
class DSInput : public DSObject
{
+DS_PIMPL_USE_PRIVATE(DSInput);
public:
enum DeviceClass {
None = 0,
};
public:
DSInput();
- virtual ~DSInput();
-
-private:
- inline DSInputPrivate *__d_func()
- {
- return reinterpret_cast<DSInputPrivate *>(_d_ptr.get());
- }
- inline const DSInputPrivate *__d_func() const
- {
- return reinterpret_cast<DSInputPrivate *>(_d_ptr.get());
- }
- friend class DSInputPrivate;
+ ~DSInput() override;
};
class DSInputDevice
{
public:
DSInputDevice();
- DSInputDevice(string name, string identifier, DSInput::DeviceClass clas);
+ DSInputDevice(std::string name, std::string identifier, DSInput::DeviceClass clas);
~DSInputDevice();
- string getName() const;
- void setName(string name);
+ std::string getName() const;
+ void setName(std::string name);
- string getIdentifier() const;
- void setIdentifier(string identifier);
+ std::string getIdentifier() const;
+ void setIdentifier(std::string identifier);
DSInput::DeviceClass getClass() const;
void setClass(DSInput::DeviceClass clas);
+
private:
- string __deviceName;
- string __deviceIdentifier;
+ std::string __deviceName;
+ std::string __deviceIdentifier;
DSInput::DeviceClass __deviceClass;
};
class DSInputPrivate : public DSObjectPrivate
{
+DS_PIMPL_USE_PUBLIC(DSInput);
public:
DSInputPrivate() = delete;
DSInputPrivate(DSInput *p_ptr);