Interface to a parsing subsystem.
More...
#include "iparser.h"
|
|
virtual void | cleanup () const =0 |
| | Cleanup function after parsing or if an exception is thrown.
|
| |
| virtual const char * | getMode () const =0 |
| | Gets the opening mode of the input file. More...
|
| |
| virtual ProjectInterface * | parse (const Common::URI &infile, Factory *const factory, ProjectInterface *const lib=0) const =0 throw (HGL::Exception::ParserException, HGL::Exception::IOException) |
| | Parses an input source and returns a type tree. More...
|
| |
| virtual ProjectInterface * | parse (Factory *const factory, ProjectInterface *const lib) const =0 throw (HGL::Exception::ParserException, HGL::Exception::IOException) |
| |
template<class ProjectInterface = HGL::Type::IProject, class Factory = HGL::Type::IProjectFactory>
interface HGL::Common::IParser< ProjectInterface, Factory >
Interface to a parsing subsystem.
This interface provides methods needed for HGL::Common::createProject Concrete subclasses should implement a parser, which returns the ProjectInterface as root of the type tree and use Factory to create the types.
- See Also
- HGL::Type::IProject
-
HGL::Type::IProjectFactory
-
HGL::Common::createProject
- Template Parameters
-
| ProjectInterface | the type of root type |
| Factory | type of the factory to create types |
- Author
- Heiko Schäfer heiko.nosp@m.@hgl.nosp@m..rang.nosp@m.un.d.nosp@m.e
template<class ProjectInterface = HGL::Type::IProject, class Factory = HGL::Type::IProjectFactory>
Gets the opening mode of the input file.
"rb" for binary input or "r" for text input
- Returns
- the opening mode of the input file
template<class ProjectInterface = HGL::Type::IProject, class Factory = HGL::Type::IProjectFactory>
Parses an input source and returns a type tree.
- Exceptions
-
- Parameters
-
| infile | the input file |
| factory | factory to use to create types |
| lib | root node of the standard library |
- Returns
- the root node of the type tree
template<class ProjectInterface = HGL::Type::IProject, class Factory = HGL::Type::IProjectFactory>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.