Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

ConfigWriter.h

00001 /*****************************************************************************
00002  * Author:   Valient Gough <vgough@pobox.com>
00003  *
00004  *****************************************************************************
00005  * Copyright (c) 2001, Valient Gough
00006  *
00007  * This library is free software; you can distribute it and/or modify it under
00008  * the terms of the GNU Lesser General Public License (LGPL), as published by
00009  * the Free Software Foundation; either version 2.1 of the License, or (at your
00010  * option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful, but WITHOUT
00013  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014  * FITNESS FOR A PARTICULAR PURPOSE.  See the LGPL in the file COPYING for more
00015  * details.
00016  *
00017  */
00018 
00019 #ifndef _ConfigWriter_incl_
00020 #define _ConfigWriter_incl_
00021 
00022 #include <rel-config/ConfigParser.h>
00023 
00024 namespace rel
00025 {
00026 
00027     class ConfigWriter
00028     {
00029     public:
00030         // write configuration to output file.
00031         ConfigWriter(const char *outputFile);
00032         // This writes to outputFile using modelFile as the model.  Comments
00033         // and statement ordering from the modelFile are maintained in the
00034         // outputFile.  outputFile may be the same as modelFile.
00035         ConfigWriter(const char *outputFile,
00036                 const char *modelFile);
00037 
00038         virtual ~ConfigWriter();
00039 
00040         // write the map provided.
00041         bool writeMap(const VMapPtr &data);
00042 
00043     private:
00044         struct ConfigWriterImpl *impl;
00045     };
00046 
00047 
00048     class ConfigWriterParser : public ConfigParser
00049     {
00050     public:
00051         ConfigWriterParser(const SmartPtr<istream> &input);
00052         ~ConfigWriterParser();
00053 
00054         VMapPtr createNewDir();
00055     };
00056 
00057 } // namespace rel
00058 
00059 
00060 #endif
00061 

Generated at Sat Sep 22 02:20:00 2001 for librel by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001