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