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