version_ini.h

Go to the documentation of this file.
00001 #ifndef VERSION_INI_CLASS
00002 #define VERSION_INI_CLASS
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : version_ini editing support                                       *
00007 *  Author : Chris Koeritz                                                     *
00008 *                                                                             *
00009 *******************************************************************************
00010 * Copyright (c) 1995-$now By Author.  This program is free software; you can  *
00011 * redistribute it and/or modify it under the terms of the GNU General Public  *
00012 * License as published by the Free Software Foundation; either version 2 of   *
00013 * the License or (at your option) any later version.  This is online at:      *
00014 *     http://www.fsf.org/copyleft/gpl.html                                    *
00015 * Please send any updates to: fred@gruntose.com                               *
00016 \*****************************************************************************/
00017 
00018 #include "opsysdll.h"
00019 
00020 #include <basis/log_base.h>
00021 
00022 // forward.
00023 class filename;
00024 class ini_configurator;
00025 class version;
00026 class version_record;
00027 
00029 
00035 class OPSYSTEM_CLASS_STYLE version_ini : public virtual object_base
00036 {
00037 public:
00038   version_ini(const istring &path_name);
00040 
00043   ~version_ini();
00044 
00045   IMPLEMENT_CLASS_NAME("version_ini");
00046 
00047   bool writable();
00049 
00050   version get_version();
00052 
00054   void set_version(const version &to_write, bool write_to_ini);
00056 
00061   version_record get_record();
00063 
00068   version_record &access_record();
00070 
00072   void set_record(const version_record &to_write, bool write_to_ini);
00074 
00078   bool executable();
00080   bool library();
00082 
00083   bool ole_auto_registering();
00085 
00086   bool write_rc(const version_record &to_write);
00088 
00091   bool write_code(const version_record &to_write);
00093 
00097   bool write_assembly(const version_record &to_write, bool do_logging);
00099 
00100   static bool executable(const istring &path_name);
00102   static bool library(const istring &path_name);
00104 
00105   version read_version_from_ini();
00107 
00108   static bool one_stop_version_stamp(const istring &path,
00109           const istring &source_version, bool do_logging);
00111 
00116   // constants for strings found in the version INI file.
00117   static const char *VERSION_SECTION;
00118   static const char *COMPANY_KEY;
00119   static const char *COPYRIGHT_KEY;
00120   static const char *LEGAL_INFO_KEY;
00121   static const char *PRODUCT_KEY;
00122   static const char *WEB_SITE_KEY;
00123   static const char *MAJOR;
00124   static const char *MINOR;
00125   static const char *REVISION;
00126   static const char *BUILD;
00127   static const char *DESCRIPTION;
00128   static const char *ROOT;
00129   static const char *NAME;
00130   static const char *EXTENSION;
00131   static const char *OLE_AUTO;
00132 
00133 private:
00134   bool _loaded;  
00135   filename *_path_name;  
00136   ini_configurator *_ini;  
00137   version_record *_held_record;  
00138 
00139   static void check_name(filename &to_examine);
00141 };
00142 
00143 #endif
00144 

Generated on Fri Nov 21 04:29:56 2008 for HOOPLE Libraries by  doxygen 1.5.1