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

Last change on this file since 3 was 3, checked in by sgosseli, 12 years ago
  • Add the existing Pacpus files from pacpusdev and pacpuscore.
  • Provide a clean build system based on multiple CMake files.
File size: 2.3 KB
Line 
1/*********************************************************************
2// created: 2007/04/12 - 16:30
3
4//
5// author: Elie Al Alam & Gerald Dherbomez
6//
7// version: $Id: $
8//
9// purpose: Dbite Player Engine state chart header file
10*********************************************************************/
11
12#ifndef DBTPLYENGINESTATECHART_H
13#define DBTPLYENGINESTATECHART_H
14
15#include <qstring.h>
16
17#include "DbitePlayerConfig.h"
18
19namespace pacpus {
20
21class DbtPlyEngine;
22
23////////////////////////////////////////////////////////////////////////////////
24class DBITE_PLAYER_API DbtPlyEngineState
25{
26public:
27 virtual ~DbtPlyEngineState();
28
29 virtual void play(DbtPlyEngine & engine);
30 virtual void pause(DbtPlyEngine & engine);
31 virtual void stop(DbtPlyEngine & engine);
32
33 virtual void speedUp(DbtPlyEngine & engine);
34 virtual void speedDown(DbtPlyEngine & engine);
35
36 virtual bool isPlaying();
37
38 virtual QString toString() const = 0;
39
40protected:
41 DbtPlyEngineState();
42};
43
44////////////////////////////////////////////////////////////////////////////////
45class DBITE_PLAYER_API PlayingState
46 : public DbtPlyEngineState
47{
48public:
49 virtual void pause(DbtPlyEngine & engine);
50 virtual void stop(DbtPlyEngine & engine);
51
52 virtual bool isPlaying();
53
54 virtual QString toString() const;
55 static DbtPlyEngineState * getInstance();
56
57private:
58 PlayingState();
59 static PlayingState mInstance;
60};
61
62////////////////////////////////////////////////////////////////////////////////
63class DBITE_PLAYER_API PausedState
64 : public DbtPlyEngineState
65{
66public:
67 virtual void play(DbtPlyEngine & engine);
68 virtual void stop(DbtPlyEngine & engine);
69
70 virtual QString toString() const;
71 static DbtPlyEngineState * getInstance();
72
73private:
74 PausedState();
75 static PausedState mInstance;
76};
77
78////////////////////////////////////////////////////////////////////////////////
79class DBITE_PLAYER_API StoppedState
80 : public DbtPlyEngineState
81{
82public:
83 virtual void play(DbtPlyEngine & engine);
84
85 virtual QString toString() const;
86 static DbtPlyEngineState * getInstance();
87
88private:
89 StoppedState();
90 static StoppedState mInstance;
91};
92
93} // namespace pacpus
94
95#endif // DBTPLYENGINESTATECHART_H
Note: See TracBrowser for help on using the repository browser.