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

Last change on this file since 48 was 31, checked in by sgosseli, 12 years ago

Huge commit: use the new includes style in all the files, add the license header in all the headers, and in some cpp.

File size: 2.3 KB
Line 
1/**
2 *
3 * Distributed under the UTC Heudiascy Pacpus License, Version 1.0.
4 * Copyright (c) UTC Heudiasyc 2010 - 2013. All rights reserved.
5 *
6 * See the LICENSE file for more information or a copy at:
7 * http://www.hds.utc.fr/~kurdejma/LICENSE_1_0.txt
8 *
9 */
10
11#ifndef DEF_PACPUS_DBTPLYENGINESTATECHART_H
12#define DEF_PACPUS_DBTPLYENGINESTATECHART_H
13
14#include <QString>
15
16#include <Pacpus/DbitePlayer/DbitePlayerConfig.h>
17
18namespace pacpus {
19
20class DbtPlyEngine;
21
22////////////////////////////////////////////////////////////////////////////////
23class DBITE_PLAYER_API DbtPlyEngineState
24{
25public:
26 virtual ~DbtPlyEngineState();
27
28 virtual void play(DbtPlyEngine & engine);
29 virtual void pause(DbtPlyEngine & engine);
30 virtual void stop(DbtPlyEngine & engine);
31
32 virtual void speedUp(DbtPlyEngine & engine);
33 virtual void speedDown(DbtPlyEngine & engine);
34
35 virtual bool isPlaying();
36
37 virtual QString toString() const = 0;
38
39protected:
40 DbtPlyEngineState();
41};
42
43////////////////////////////////////////////////////////////////////////////////
44class DBITE_PLAYER_API PlayingState
45 : public DbtPlyEngineState
46{
47public:
48 virtual void pause(DbtPlyEngine & engine);
49 virtual void stop(DbtPlyEngine & engine);
50
51 virtual bool isPlaying();
52
53 virtual QString toString() const;
54 static DbtPlyEngineState * getInstance();
55
56private:
57 PlayingState();
58 static PlayingState mInstance;
59};
60
61////////////////////////////////////////////////////////////////////////////////
62class DBITE_PLAYER_API PausedState
63 : public DbtPlyEngineState
64{
65public:
66 virtual void play(DbtPlyEngine & engine);
67 virtual void stop(DbtPlyEngine & engine);
68
69 virtual QString toString() const;
70 static DbtPlyEngineState * getInstance();
71
72private:
73 PausedState();
74 static PausedState mInstance;
75};
76
77////////////////////////////////////////////////////////////////////////////////
78class DBITE_PLAYER_API StoppedState
79 : public DbtPlyEngineState
80{
81public:
82 virtual void play(DbtPlyEngine & engine);
83
84 virtual QString toString() const;
85 static DbtPlyEngineState * getInstance();
86
87private:
88 StoppedState();
89 static StoppedState mInstance;
90};
91
92} // namespace pacpus
93
94#endif // DEF_PACPUS_DBTPLYENGINESTATECHART_H
Note: See TracBrowser for help on using the repository browser.