Crossfire Server, Trunk  R20513
ScriptFile.h
Go to the documentation of this file.
1 #ifndef SCRIPTFILE_H
2 #define SCRIPTFILE_H
3 
4 #include <QList>
5 
7 
10 {
11  public:
12  HookInformation(CREMapInformation* map, int x, int y, const QString& itemName, const QString& pluginName, const QString& eventName);
13 
14  const CREMapInformation* map() const;
15  int x() const;
16  int y() const;
17  QString itemName() const;
18  QString pluginName() const;
19  QString eventName() const;
20 
21  private:
23  int myX;
24  int myY;
25  QString myItemName;
26  QString myPluginName;
27  QString myEventName;
28 };
29 
32 {
33  public:
34  ScriptFile(const QString& path);
35  virtual ~ScriptFile();
36 
37  void addHook(HookInformation* hook);
38  bool forMap(CREMapInformation* map) const;
44  bool removeMap(CREMapInformation* map);
45  QList<HookInformation*> hooks() const;
46  const QString& path() const;
47 
48  private:
49  QString myPath;
50  QList<HookInformation*> myHooks;
51 };
52 
53 #endif /* SCRIPTFILE_H */
54 
int x() const
Definition: ScriptFile.cpp:75
QString myPluginName
Definition: ScriptFile.h:26
Information about a script file.
Definition: ScriptFile.h:31
QString itemName() const
Definition: ScriptFile.cpp:85
QString myItemName
Definition: ScriptFile.h:25
QString myPath
Definition: ScriptFile.h:49
int y() const
Definition: ScriptFile.cpp:80
QString eventName() const
Definition: ScriptFile.cpp:95
CREMapInformation * myMap
Definition: ScriptFile.h:22
HookInformation(CREMapInformation *map, int x, int y, const QString &itemName, const QString &pluginName, const QString &eventName)
Definition: ScriptFile.cpp:60
QString pluginName() const
Definition: ScriptFile.cpp:90
const CREMapInformation * map() const
Definition: ScriptFile.cpp:70
QString myEventName
Definition: ScriptFile.h:27
Information about an event hook, linked to a script file.
Definition: ScriptFile.h:9
QList< HookInformation * > myHooks
Definition: ScriptFile.h:50