source: pacpusframework/trunk/include/Pacpus/DbitePlayer/DbtPlyEngineStateChart.h@ 91

Last change on this file since 91 was 91, checked in by DHERBOMEZ Gérald, 11 years ago

Improvement of the build system to avoid some workarounds

  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1// %pacpus:license{
2// This file is part of the PACPUS framework distributed under the
3// CECILL-C License, Version 1.0.
4// %pacpus:license}
5/// @file
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.
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
22namespace pacpus {
23
24class DbtPlyEngine;
25
26////////////////////////////////////////////////////////////////////////////////
27class DBITE_PLAYER_API DbtPlyEngineState
28{
29public:
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
51protected:
52 /// @todo Documentation
53 DbtPlyEngineState();
54};
55
56////////////////////////////////////////////////////////////////////////////////
57class DBITE_PLAYER_API PlayingState
58 : public DbtPlyEngineState
59{
60public:
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
74private:
75 PlayingState();
76 static PlayingState mInstance;
77};
78
79////////////////////////////////////////////////////////////////////////////////
80/// State class when player is on pause.
81class DBITE_PLAYER_API PausedState
82 : public DbtPlyEngineState
83{
84public:
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
95private:
96 PausedState();
97 static PausedState mInstance;
98};
99
100////////////////////////////////////////////////////////////////////////////////
101/// State class when player is stopped.
102class DBITE_PLAYER_API StoppedState
103 : public DbtPlyEngineState
104{
105public:
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
114private:
115 StoppedState();
116 static StoppedState mInstance;
117};
118
119} // namespace pacpus
120
121#endif // DEF_PACPUS_DBTPLYENGINESTATECHART_H
Note: See TracBrowser for help on using the repository browser.