File: emdlparser.h

package info (click to toggle)
epiphany 0.7.0+0-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 7,532 kB
  • sloc: cpp: 6,404; ansic: 141; makefile: 78; sh: 7
file content (68 lines) | stat: -rw-r--r-- 2,055 bytes parent folder | download | duplicates (6)
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
68
// -*- 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 "dephine.h"
#include <string>
#include <fstream>
#include "entity_type.h"

class EMDLParser
{
private:
	Uint32 m_x0;
	Uint32 m_y0;
	Uint32 m_x1;
	Uint32 m_y1;
	Uint32 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, Uint32)=0;
	virtual void handle_command_line(Entity_Type, Uint32, Uint32, Uint32, Uint32)=0;
	virtual void handle_command_rect(Entity_Type, Uint32, Uint32, Uint32, Uint32)=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