[76] | 1 | // %pacpus:license{
|
---|
[62] | 2 | // This file is part of the PACPUS framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
[76] | 4 | // %pacpus:license}
|
---|
[66] | 5 | /// @file
|
---|
[62] | 6 | /// @author Gerald Dherbomez <firstname.surname@utc.fr>
|
---|
| 7 | /// @author Marek Kurdej <firstname.surname@utc.fr>
|
---|
| 8 | /// @date April, 2007
|
---|
| 9 | /// @version $Id: DbtPlyEngineStateChart.h 91 2013-05-19 10:32:48Z gdherbom $
|
---|
| 10 | /// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
|
---|
| 11 | /// @brief DbitePlayer state machine.
|
---|
| 12 | ///
|
---|
| 13 | /// Detailed description.
|
---|
[3] | 14 |
|
---|
[31] | 15 | #ifndef DEF_PACPUS_DBTPLYENGINESTATECHART_H
|
---|
| 16 | #define DEF_PACPUS_DBTPLYENGINESTATECHART_H
|
---|
[3] | 17 |
|
---|
[31] | 18 | #include <QString>
|
---|
[3] | 19 |
|
---|
[31] | 20 | #include <Pacpus/DbitePlayer/DbitePlayerConfig.h>
|
---|
[3] | 21 |
|
---|
| 22 | namespace pacpus {
|
---|
| 23 |
|
---|
| 24 | class DbtPlyEngine;
|
---|
| 25 |
|
---|
| 26 | ////////////////////////////////////////////////////////////////////////////////
|
---|
| 27 | class DBITE_PLAYER_API DbtPlyEngineState
|
---|
| 28 | {
|
---|
| 29 | public:
|
---|
[53] | 30 | /// @todo Documentation
|
---|
[3] | 31 | virtual ~DbtPlyEngineState();
|
---|
[53] | 32 |
|
---|
| 33 | /// @todo Documentation
|
---|
[3] | 34 | virtual void play(DbtPlyEngine & engine);
|
---|
[53] | 35 | /// @todo Documentation
|
---|
[3] | 36 | virtual void pause(DbtPlyEngine & engine);
|
---|
[53] | 37 | /// @todo Documentation
|
---|
[3] | 38 | virtual void stop(DbtPlyEngine & engine);
|
---|
[53] | 39 |
|
---|
| 40 | /// @todo Documentation
|
---|
[3] | 41 | virtual void speedUp(DbtPlyEngine & engine);
|
---|
[53] | 42 | /// @todo Documentation
|
---|
[3] | 43 | virtual void speedDown(DbtPlyEngine & engine);
|
---|
[53] | 44 |
|
---|
| 45 | /// @todo Documentation
|
---|
[3] | 46 | virtual bool isPlaying();
|
---|
[53] | 47 |
|
---|
| 48 | /// @todo Documentation
|
---|
[3] | 49 | virtual QString toString() const = 0;
|
---|
| 50 |
|
---|
| 51 | protected:
|
---|
[53] | 52 | /// @todo Documentation
|
---|
[3] | 53 | DbtPlyEngineState();
|
---|
| 54 | };
|
---|
| 55 |
|
---|
| 56 | ////////////////////////////////////////////////////////////////////////////////
|
---|
| 57 | class DBITE_PLAYER_API PlayingState
|
---|
| 58 | : public DbtPlyEngineState
|
---|
| 59 | {
|
---|
| 60 | public:
|
---|
[53] | 61 | /// @todo Documentation
|
---|
[3] | 62 | virtual void pause(DbtPlyEngine & engine);
|
---|
[53] | 63 | /// @todo Documentation
|
---|
[3] | 64 | virtual void stop(DbtPlyEngine & engine);
|
---|
[53] | 65 |
|
---|
| 66 | /// @todo Documentation
|
---|
[3] | 67 | virtual bool isPlaying();
|
---|
[53] | 68 |
|
---|
| 69 | /// @todo Documentation
|
---|
[3] | 70 | virtual QString toString() const;
|
---|
[53] | 71 | /// @todo Documentation
|
---|
[3] | 72 | static DbtPlyEngineState * getInstance();
|
---|
| 73 |
|
---|
| 74 | private:
|
---|
| 75 | PlayingState();
|
---|
| 76 | static PlayingState mInstance;
|
---|
| 77 | };
|
---|
| 78 |
|
---|
| 79 | ////////////////////////////////////////////////////////////////////////////////
|
---|
[69] | 80 | /// State class when player is on pause.
|
---|
[3] | 81 | class DBITE_PLAYER_API PausedState
|
---|
| 82 | : public DbtPlyEngineState
|
---|
| 83 | {
|
---|
| 84 | public:
|
---|
[53] | 85 | /// @todo Documentation
|
---|
[3] | 86 | virtual void play(DbtPlyEngine & engine);
|
---|
[53] | 87 | /// @todo Documentation
|
---|
[3] | 88 | virtual void stop(DbtPlyEngine & engine);
|
---|
[53] | 89 |
|
---|
| 90 | /// @todo Documentation
|
---|
[3] | 91 | virtual QString toString() const;
|
---|
[53] | 92 | /// @todo Documentation
|
---|
[3] | 93 | static DbtPlyEngineState * getInstance();
|
---|
| 94 |
|
---|
| 95 | private:
|
---|
| 96 | PausedState();
|
---|
| 97 | static PausedState mInstance;
|
---|
| 98 | };
|
---|
| 99 |
|
---|
| 100 | ////////////////////////////////////////////////////////////////////////////////
|
---|
[69] | 101 | /// State class when player is stopped.
|
---|
[3] | 102 | class DBITE_PLAYER_API StoppedState
|
---|
| 103 | : public DbtPlyEngineState
|
---|
| 104 | {
|
---|
| 105 | public:
|
---|
[53] | 106 | /// @todo Documentation
|
---|
[3] | 107 | virtual void play(DbtPlyEngine & engine);
|
---|
[53] | 108 |
|
---|
| 109 | /// @todo Documentation
|
---|
[3] | 110 | virtual QString toString() const;
|
---|
[53] | 111 | /// @todo Documentation
|
---|
[3] | 112 | static DbtPlyEngineState * getInstance();
|
---|
| 113 |
|
---|
| 114 | private:
|
---|
| 115 | StoppedState();
|
---|
| 116 | static StoppedState mInstance;
|
---|
| 117 | };
|
---|
| 118 |
|
---|
| 119 | } // namespace pacpus
|
---|
| 120 |
|
---|
[31] | 121 | #endif // DEF_PACPUS_DBTPLYENGINESTATECHART_H
|
---|