Made appropriate limitations to classes
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
#ifndef CHARGE_AUDIO_BASE_H
|
#ifndef CHARGE_AUDIO_BASE_H
|
||||||
#define CHARGE_AUDIO_BASE_H
|
#define CHARGE_AUDIO_BASE_H
|
||||||
#include <Corrade/Containers/Containers.h>
|
#include <Corrade/Containers/Containers.h>
|
||||||
|
#include <Corrade/Containers/Optional.h>
|
||||||
#include <Corrade/Containers/Pointer.h>
|
#include <Corrade/Containers/Pointer.h>
|
||||||
#include <Magnum/Magnum.h>
|
#include <Magnum/Magnum.h>
|
||||||
#include <Magnum/Math/Vector.h>
|
#include <Magnum/Math/Vector.h>
|
||||||
@@ -20,6 +21,14 @@ class Sound {
|
|||||||
public:
|
public:
|
||||||
enum class SoundState { Idle, Playing, Paused, Finished };
|
enum class SoundState { Idle, Playing, Paused, Finished };
|
||||||
|
|
||||||
|
// No copying
|
||||||
|
Sound(const Sound &) = delete;
|
||||||
|
Sound &operator=(const Sound &) = delete;
|
||||||
|
|
||||||
|
// No moving
|
||||||
|
Sound(Sound &&) = delete;
|
||||||
|
Sound &operator=(Sound &&) = delete;
|
||||||
|
|
||||||
~Sound();
|
~Sound();
|
||||||
void Play();
|
void Play();
|
||||||
void Pause();
|
void Pause();
|
||||||
@@ -49,6 +58,10 @@ private:
|
|||||||
|
|
||||||
class Listener {
|
class Listener {
|
||||||
public:
|
public:
|
||||||
|
// No copying, can move
|
||||||
|
Listener(const Listener &) = delete;
|
||||||
|
Listener &operator=(const Listener &) = delete;
|
||||||
|
|
||||||
void SetEnabled(bool isEnabled);
|
void SetEnabled(bool isEnabled);
|
||||||
const bool GetEnabled();
|
const bool GetEnabled();
|
||||||
void SetDirection(Magnum::Vector3 position);
|
void SetDirection(Magnum::Vector3 position);
|
||||||
@@ -66,6 +79,15 @@ private:
|
|||||||
class Engine {
|
class Engine {
|
||||||
public:
|
public:
|
||||||
Engine();
|
Engine();
|
||||||
|
|
||||||
|
// No copying
|
||||||
|
Engine(const Engine &) = delete;
|
||||||
|
Engine &operator=(const Engine &) = delete;
|
||||||
|
|
||||||
|
// No movement
|
||||||
|
Engine(Engine &&) = delete;
|
||||||
|
Engine &operator=(Engine &&) = delete;
|
||||||
|
|
||||||
~Engine();
|
~Engine();
|
||||||
|
|
||||||
// Creating tools
|
// Creating tools
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
#include "ChargeAudio.hpp"
|
#include "ChargeAudio.hpp"
|
||||||
#include <Corrade/Containers/Containers.h>
|
#include <Corrade/Containers/Containers.h>
|
||||||
#include <Corrade/Containers/Pointer.h>
|
#include <Corrade/Containers/Pointer.h>
|
||||||
|
#include <Corrade/Tags.h>
|
||||||
#include <Corrade/Utility/Debug.h>
|
#include <Corrade/Utility/Debug.h>
|
||||||
#include <Magnum/Math/Vector3.h>
|
#include <Magnum/Math/Vector3.h>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user