00001
00015 #ifndef PARSER_H
00016 #define PARSER_H
00017
00018 #include <stdlib.h>
00019 #include <libxml/xmlreader.h>
00020 #include <sys/types.h>
00021 #include <dirent.h>
00022 #include <vector>
00023 #include <list>
00024 #include <map>
00025 #include "elements.h"
00026 #include "interpreter.h"
00027
00028 using namespace std;
00029
00030 namespace SMP{
00031
00033 class SMPInterpreter;
00034
00041 class SMPParser{
00042 private:
00044 vector<_filter*> *filter;
00046 vector<_buffer*> *buffer;
00048 SMPInterpreter *interp;
00049 public:
00050
00052 SMPParser(vector<_filter*> *f, vector<_buffer*> *b, SMPInterpreter *interpreter);
00054 ~SMPParser();
00055
00063 int parse_filter_port_pair(const char *from, int &fid, int &pid);
00064
00071 int set_buffer_dest(_buffer *buf, char *str);
00072
00083 int set_buffer_dest_new(int src_fid, int src_pid, char *str, int type);
00084
00091 int load_filter(vector<_filter*> *target, char *filename);
00092
00100 int load_filters(vector<_filter*> *f);
00101
00106 bool load_project(const char *filename);
00107
00112 void save_project(const char *filename);
00113
00114 };
00115
00116 }
00117
00118 #endif