1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
// -*- C++ -*-
/***************************************************************************
emdlparser.cpp - definition of emdlparser
-------------------
begin : Mar Jan 14 2003
copyright : (C) 2003 by Giuseppe "denever" Martino
email : rdmartin@infinito.it
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef EMDLPARSER_H
#define EMDLPARSER_H
#include <string>
#include <fstream>
#include "entity_type.h"
class EMDLParser
{
private:
unsigned int m_x0;
unsigned int m_y0;
unsigned int m_x1;
unsigned int m_y1;
unsigned int m_value;
std::string m_command;
std::string m_object;
std::string m_string_value;
public:
EMDLParser();
virtual ~EMDLParser()
{
clear();
}
void clear();
void read(char);
void operator<<(std::ifstream&);
virtual void handle_command_put(Entity_Type, int x, int y)=0;
virtual void handle_command_set_str(std::string, std::string)=0;
virtual void handle_command_set_int(std::string, unsigned int)=0;
virtual void handle_command_line(Entity_Type, unsigned int, unsigned int, unsigned int, unsigned int)=0;
virtual void handle_command_rect(Entity_Type, unsigned int, unsigned int, unsigned int, unsigned int)=0;
virtual void handle_command_view()=0;
virtual void handle_command_write()=0;
virtual void handle_sintaxerror_comma()=0;
virtual void handle_sintaxerror_par()=0;
};
#endif //EMDLPARSER_H
|