File: namelist.h

package info (click to toggle)
dynare 4.4.3-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 41,356 kB
  • ctags: 15,842
  • sloc: cpp: 77,029; ansic: 29,056; pascal: 13,241; sh: 4,811; objc: 3,061; yacc: 3,013; makefile: 1,479; lex: 1,258; python: 162; lisp: 54; xml: 8
file content (32 lines) | stat: -rw-r--r-- 858 bytes parent folder | download | duplicates (4)
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
// Copyright (C) 2007, Ondra Kamenik

// $Id: namelist.h 107 2007-05-10 22:35:04Z ondra $

#ifndef OGP_NAMELIST
#define OGP_NAMELIST

namespace ogp {

	/** Parent class of all parsers parsing a namelist. They must
	 * implement add_name() method and error() method, which is called
	 * when an parse error occurs. 
	 *
	 * Parsing a name list is done as follows: implement
	 * NameListParser interface, create the object, and call
	 * NameListParser::namelist_parse(int lengt, const char*
	 * text). When implementing error(), one may consult global
	 * location_type namelist_lloc. */
	class NameListParser {
	public:
		virtual ~NameListParser() {}
		virtual void add_name(const char* name) = 0;
		virtual void namelist_error(const char* mes) = 0;
		void namelist_parse(int length, const char* text);
	};
};

#endif

// Local Variables:
// mode:C++
// End: