kexi
context.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KOMACRO_CONTEXT_H
00021 #define KOMACRO_CONTEXT_H
00022
00023 #include <qobject.h>
00024 #include <ksharedptr.h>
00025
00026 #include "variable.h"
00027
00028 namespace KoMacro {
00029
00030
00031 class Macro;
00032 class MacroItem;
00033 class Action;
00034 class Exception;
00035
00041 class KOMACRO_EXPORT Context
00042 : public QObject
00043 , public KShared
00044 {
00045 Q_OBJECT
00046 public:
00047
00053 explicit Context(KSharedPtr<Macro> macro);
00054
00058 ~Context();
00059
00064 bool hasVariable(const QString& name) const;
00065
00070 KSharedPtr<Variable> variable(const QString& name) const;
00071
00076 Variable::Map variables() const;
00077
00082 void setVariable(const QString& name, KSharedPtr<Variable> variable);
00083
00087 KSharedPtr<Macro> macro() const;
00088
00093 KSharedPtr<MacroItem> macroItem() const;
00094
00099 bool hadException() const;
00100
00106 Exception* exception() const;
00107
00108 private slots:
00109
00116 virtual void activate(QValueList<KSharedPtr <MacroItem> >::ConstIterator it);
00117
00118 public slots:
00119
00125 virtual void activate(KSharedPtr<Context> context);
00126
00130 virtual void activateNext();
00131
00132 private:
00134 class Private;
00136 Private* const d;
00137 };
00138
00139 }
00140
00141 #endif
|