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

uniinigen.h

Go to the documentation of this file.
00001 /* -*- Mode: C++ -*- 00002 * Worldvisions Weaver Software: 00003 * Copyright (C) 1997-2002 Net Integration Technologies, Inc. 00004 * 00005 * A generator for .ini files. 00006 */ 00007 #ifndef __UNICONFINI_H 00008 #define __UNICONFINI_H 00009 00010 #include "uniconfgen.h" 00011 #include "unitempgen.h" 00012 #include "wvlog.h" 00013 00014 /** 00015 * Loads and saves ".ini"-style files similar to those used by 00016 * Windows, but adapted to represent keys and values using Tcl 00017 * style lists. 00018 * 00019 * To mount, use the moniker prefix "ini:" followed by the 00020 * path of the .ini file. 00021 * 00022 */ 00023 class UniIniGen : public UniTempGen 00024 { 00025 WvString filename; 00026 int create_mode; 00027 WvLog log; 00028 00029 public: 00030 /** 00031 * Creates a generator which can load/modify/save a .ini file. 00032 * "filename" is the local path of the .ini file 00033 */ 00034 UniIniGen(WvStringParm filename, int _create_mode = 0666); 00035 00036 virtual ~UniIniGen(); 00037 00038 /***** Overridden members *****/ 00039 00040 virtual void commit(); 00041 virtual bool refresh(); 00042 00043 private: 00044 void save(WvStream &file, UniConfValueTree &parent); 00045 bool refreshcomparator(const UniConfValueTree *a, 00046 const UniConfValueTree *b, void *userdata); 00047 }; 00048 00049 00050 #endif // __UNICONFINI_H

Generated on Tue Oct 5 01:09:19 2004 for WvStreams by doxygen 1.3.7