mercenary/mirc/includes/script.h
Correl Roush 0e773a5687 Crazed attempts at getting line number info.
git-svn-id: file:///srv/svn/ircclient/trunk@10 a9804ffe-773b-11dd-bd7c-89c3ef1d2733
2009-05-05 18:14:05 +00:00

35 lines
707 B
C++

#ifndef MIRC_SCRIPT_H
#define MIRC_SCRIPT_H
#include <QObject>
#include <QString>
#include <QMap>
#include "mirc.h"
#include "parser.h"
class MIRCScript : public QObject {
Q_OBJECT
private:
MIRCScriptManager *manager;
QString script;
QMap<QString, mirc_alias> _aliases;
QMap<QString, QString> _variables;
mirc_script_engine *interpreter;
mirc_script *parser;
iterator_t *begin;
iterator_t *end;
bool loaded;
public:
MIRCScript(MIRCScriptManager *m);
bool load(QString filename);
bool parse(QString script);
bool run();
bool run(QString alias);
QString code();
QString code(QString alias);
int line();
QMap<QString, mirc_alias> aliases();
QMap<QString, QString> variables();
};
#endif