Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members

parser.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * parser.h
00003  * Last Change: 2003-12-27
00004  * Copyright (c) 2003 Sebastian "randomZ" Beschke
00005  ****************
00006  * This file is part of the libsofu project, a parser library for an all-purpose
00007  * ASCII file format. More information can be found on the project web site
00008  * at http://sofu.sourceforge.net/ .
00009  *
00010  * libsofu is published under the terms of the MIT license, which basically means
00011  * "Do with it whatever you want". For more information, see the license.txt
00012  * file that should be enclosed with libsofu distributions. A copy of the license
00013  * is (at the time of this writing) also available at
00014  * http://www.opensource.org/licenses/mit-license.php .
00015  *****************************************************************************/
00016 
00022 #ifndef INC_SOFU_PARSER_H
00023 #define INC_SOFU_PARSER_H
00024 
00025 #include "main.h"
00026 
00027 namespace Sofu
00028 {
00029     class Object;
00030     class Composite;
00031 
00038     Composite* parseFile(const string& filename);
00039 
00046     Composite* parseStream(istream& file);
00047     
00054     struct Exc_UnexpectedEndOfFile : public Exc
00055     {
00056         Exc_UnexpectedEndOfFile(void)
00057         : Exc("Sofu encountered an unexpected End of File while parsing.")
00058         { }
00059     };
00060 
00065     struct Exc_ReadError : public Exc
00066     {
00067         Exc_ReadError(void)
00068         : Exc("Sofu encountered a read error while parsing.")
00069         { }
00070     };
00071 
00074     struct Exc_UnsuccessfulRead : public Exc
00075     {
00076         Exc_UnsuccessfulRead(void)
00077         : Exc("Sofu couldn't parse the file successfully.")
00078         { }
00079     };
00080 }
00081 
00082 #endif // INC_PARSER_H

Generated on Wed Jan 7 21:34:45 2004 for libsofu by doxygen 1.3.5