libyui
YMacro.h
1 /*
2  Copyright (C) 2000-2012 Novell, Inc
3  This library is free software; you can redistribute it and/or modify
4  it under the terms of the GNU Lesser General Public License as
5  published by the Free Software Foundation; either version 2.1 of the
6  License, or (at your option) version 3.0 of the License. This library
7  is distributed in the hope that it will be useful, but WITHOUT ANY
8  WARRANTY; without even the implied warranty of MERCHANTABILITY or
9  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10  License for more details. You should have received a copy of the GNU
11  Lesser General Public License along with this library; if not, write
12  to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13  Floor, Boston, MA 02110-1301 USA
14 */
15 
16 
17 /*-/
18 
19  File: YMacro.h
20 
21  Author: Stefan Hundhammer <shundhammer@suse.de>
22 
23 /-*/
24 
25 #ifndef YMacro_h
26 #define YMacro_h
27 
28 #include <string>
29 
30 class YMacroRecorder;
31 class YMacroPlayer;
32 
33 
44 class YMacro
45 {
46 private:
47  YMacro() {}
48  ~YMacro() {}
49 
50 public:
51 
58  static void setRecorder( YMacroRecorder * recorder );
59 
66  static void setPlayer( YMacroPlayer * player );
67 
71  static void record( const std::string & macroFile );
72 
76  static void endRecording();
77 
81  static bool recording();
82 
86  static void play( const std::string & macroFile );
87 
91  static void playNextBlock();
92 
96  static bool playing();
97 
101  static YMacroRecorder * recorder() { return _recorder; }
102 
106  static YMacroPlayer * player() { return _player; }
107 
111  static void deleteRecorder();
112 
116  static void deletePlayer();
117 
118 private:
119 
120  static YMacroRecorder * _recorder;
121  static YMacroPlayer * _player;
122 };
123 
124 
125 
126 #endif // YMacro_h
static void setPlayer(YMacroPlayer *player)
Definition: YMacro.cc:46
Definition: YMacroRecorder.h:38
Definition: YMacroPlayer.h:35
static void deletePlayer()
Definition: YMacro.cc:108
static YMacroRecorder * recorder()
Definition: YMacro.h:101
static YMacroPlayer * player()
Definition: YMacro.h:106
static void endRecording()
Definition: YMacro.cc:62
static bool recording()
Definition: YMacro.cc:69
Definition: YMacro.h:44
static void setRecorder(YMacroRecorder *recorder)
Definition: YMacro.cc:37
static void play(const std::string &macroFile)
Definition: YMacro.cc:78
static void playNextBlock()
Definition: YMacro.cc:85
static void record(const std::string &macroFile)
Definition: YMacro.cc:55
static bool playing()
Definition: YMacro.cc:92
static void deleteRecorder()
Definition: YMacro.cc:101