source: pacpusframework/branches/0.2.x/include/Pacpus/DbitePlayer/DbtPlyEngineStateChart.h@ 353

Last change on this file since 353 was 89, checked in by morasjul, 11 years ago

PACPUS 2.0 Beta deployed in new branch

Major changes:
-Add communication interface between components
-Add examples for communications interface (TestComponents)
-Move to Qt5 support

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