Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

parser.h

Go to the documentation of this file.
00001 /* 
00002  * This file is part of the rfc822 library (C) rebel42@users.sourceforge.net.
00003  *
00004  * The rfc822 library is released under the terms of the GNU Library General Public License as
00005  * published by the Free Software Foundation; either version 2 of the
00006  * License, or (at your option) any later version. See the file COPYING
00007  * as included in the distribution for details.
00008  */
00009 #ifndef RFC822_PARSER_H
00010 #define RFC822_PARSER_H
00011 
00012 #include <string>
00013 
00014 #include <rfc822/header.h>
00015 
00016 using namespace std;
00017 
00018 namespace rfc822
00019 {
00020 
00022 
00030 class parser
00031 {
00032 public:
00034         parser();
00035 
00037         virtual ~parser();
00038 
00040 
00048         virtual bool parse(const string& s);
00049         
00051 
00061         virtual const string& getValue(const string& item);
00062         
00064         static string undef;
00065         
00066 protected:
00067         enum {
00068                 text = 0,
00069                 special,
00070                 comment,
00071         };
00072 
00074 
00080         virtual bool onToken(const char* t, int mode);
00081         
00083         virtual bool error(const string& err);
00084         
00086 
00089         void registerParser(const string& name)
00090                 { header::registerParser(this, name); }
00091 };
00092 
00093 };      // namespace rfc822
00094 
00095 
00096 #endif

Generated on Mon Oct 22 17:03:48 2001 for rfc822 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001