2 /// \file a_alxparser.h
3 /// ALX file parser (for one file)
7 Copyright (C) 2010, Nicolas VIVIEN
8 Copyright (C) 2005-2012, Net Direct Inc. (http://www.netdirect.ca/)
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 See the GNU General Public License in the COPYING file at the
20 root directory of this project for more details.
23 #ifndef __BARRY_A_ALX_PARSER_H__
24 #define __BARRY_A_ALX_PARSER_H__
29 #include "xmlparser.h"
30 #include "a_codsection.h"
31 #include "a_library.h"
32 #include "a_application.h"
33 #include "a_osloader.h"
42 class BXEXPORT ALXParser
: public XML::XMLParser
49 IN_SYSTEM_APPLICATION
,
52 IN_APPLICATION_APPLICATION
,
66 IN_LANGUAGE_SUPPORTED
,
78 std::tr1::shared_ptr
<CODSection
> m_codsection
;
79 std::tr1::shared_ptr
<CODSection
> m_savecodsection
;
82 ALXParser(OSLoader
& osloader
, std::istream
& input
);
83 virtual ~ALXParser(void);
85 virtual bool Run(const bool enable
);
88 // SaxParser overrides, also overridden in XMLParser
89 virtual void on_start_document();
90 virtual void on_end_document();
91 virtual void on_start_element(const Glib::ustring
& name
,
92 const xmlpp::SaxParser::AttributeList
& attrs
);
93 virtual void on_end_element(const Glib::ustring
& name
);
94 virtual void on_characters(const Glib::ustring
& data
);
95 virtual void on_comment(const Glib::ustring
& text
);
96 virtual void on_warning(const Glib::ustring
& text
);
97 virtual void on_error(const Glib::ustring
& text
);
98 virtual void on_fatal_error(const Glib::ustring
& text
);