Browse Source

Platform: publicly document copy/move inability of Event classes.

We need to create one instance, send it to subclasses and then check its
state, thus we expect that the user always operatres with the original
instance.
pull/34/head
Vladimír Vondruš 13 years ago
parent
commit
fbc9277b12
  1. 18
      src/Platform/AbstractXApplication.h
  2. 17
      src/Platform/GlutApplication.h
  3. 17
      src/Platform/NaClApplication.h
  4. 17
      src/Platform/Sdl2Application.h

18
src/Platform/AbstractXApplication.h

@ -238,12 +238,6 @@ class AbstractXApplication::Configuration {
@ref mouseMoveEvent()
*/
class AbstractXApplication::InputEvent {
InputEvent(const InputEvent&) = delete;
InputEvent(InputEvent&&) = delete;
InputEvent& operator=(const InputEvent&) = delete;
InputEvent& operator=(InputEvent&&) = delete;
public:
public:
/**
* @brief %Modifier
@ -311,6 +305,18 @@ class AbstractXApplication::InputEvent {
*/
typedef Containers::EnumSet<Button, unsigned int> Buttons;
/** @brief Copying is not allowed */
InputEvent(const InputEvent&) = delete;
/** @brief Moving is not allowed */
InputEvent(InputEvent&&) = delete;
/** @brief Copying is not allowed */
InputEvent& operator=(const InputEvent&) = delete;
/** @brief Moving is not allowed */
InputEvent& operator=(InputEvent&&) = delete;
/** @copydoc Sdl2Application::InputEvent::setAccepted() */
void setAccepted(bool accepted = true) { _accepted = accepted; }

17
src/Platform/GlutApplication.h

@ -309,12 +309,19 @@ class GlutApplication::Configuration {
@ref mousePressEvent(), @ref mouseReleaseEvent(), @ref mouseMoveEvent()
*/
class GlutApplication::InputEvent {
InputEvent(const InputEvent&) = delete;
InputEvent(InputEvent&&) = delete;
InputEvent& operator=(const InputEvent&) = delete;
InputEvent& operator=(InputEvent&&) = delete;
public:
/** @brief Copying is not allowed */
InputEvent(const InputEvent&) = delete;
/** @brief Moving is not allowed */
InputEvent(InputEvent&&) = delete;
/** @brief Copying is not allowed */
InputEvent& operator=(const InputEvent&) = delete;
/** @brief Moving is not allowed */
InputEvent& operator=(InputEvent&&) = delete;
/** @copydoc Sdl2Application::InputEvent::setAccepted() */
void setAccepted(bool accepted = true) { _accepted = accepted; }

17
src/Platform/NaClApplication.h

@ -377,11 +377,6 @@ propagated to the browser.
@ref mouseMoveEvent()
*/
class NaClApplication::InputEvent {
InputEvent(const InputEvent&) = delete;
InputEvent(InputEvent&&) = delete;
InputEvent& operator=(const InputEvent&) = delete;
InputEvent& operator=(InputEvent&&) = delete;
public:
/**
* @brief %Modifier
@ -450,6 +445,18 @@ class NaClApplication::InputEvent {
*/
typedef Containers::EnumSet<Button, std::uint32_t> Buttons;
/** @brief Copying is not allowed */
InputEvent(const InputEvent&) = delete;
/** @brief Moving is not allowed */
InputEvent(InputEvent&&) = delete;
/** @brief Copying is not allowed */
InputEvent& operator=(const InputEvent&) = delete;
/** @brief Moving is not allowed */
InputEvent& operator=(InputEvent&&) = delete;
/** @brief Modifiers */
constexpr Modifiers modifiers() const { return _modifiers; }

17
src/Platform/Sdl2Application.h

@ -454,11 +454,6 @@ CORRADE_ENUMSET_OPERATORS(Sdl2Application::Configuration::Flags)
@ref mouseMoveEvent()
*/
class Sdl2Application::InputEvent {
InputEvent(const InputEvent&) = delete;
InputEvent(InputEvent&&) = delete;
InputEvent& operator=(const InputEvent&) = delete;
InputEvent& operator=(InputEvent&&) = delete;
public:
/**
* @brief %Modifier
@ -484,6 +479,18 @@ class Sdl2Application::InputEvent {
*/
typedef Containers::EnumSet<Modifier, Uint16> Modifiers;
/** @brief Copying is not allowed */
InputEvent(const InputEvent&) = delete;
/** @brief Moving is not allowed */
InputEvent(InputEvent&&) = delete;
/** @brief Copying is not allowed */
InputEvent& operator=(const InputEvent&) = delete;
/** @brief Moving is not allowed */
InputEvent& operator=(InputEvent&&) = delete;
/**
* @brief Set event as accepted
*

Loading…
Cancel
Save