YMacroPlayer.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                        (C) SuSE GmbH |
00011 \----------------------------------------------------------------------/
00012 
00013   File:       YMacroPlayer.h
00014 
00015   Author:     Stefan Hundhammer <sh@suse.de>
00016 
00017 /-*/
00018 
00019 #ifndef YMacroPlayer_h
00020 #define YMacroPlayer_h
00021 
00022 #include <string>
00023 
00024 class YWidget;
00025 class YBlock;
00026 
00027 class YMacroPlayer
00028 {
00029 public:
00030 
00034     YMacroPlayer( const string & macroFileName );
00035 
00039     virtual ~YMacroPlayer();
00040 
00044     bool error() const { return _error; }
00045 
00050     bool finished();
00051 
00057     YCPValue evaluateNextBlock();
00058 
00062     void rewind();
00063 
00064 protected:
00065 
00069     void readMacroFile( const string & macroFileName );
00070 
00074     void clearError()   { _error = false; }
00075 
00079     void setError()     { _error = true; }
00080 
00084     YBlockPtr _macro;
00085 
00089     bool _error;
00090 
00094     int _nextBlockNo;
00095 };
00096 
00097 #endif // YMacroPlayer_h

Generated on Fri Jun 16 18:07:45 2006 for yast2-core by  doxygen 1.4.6