system_values.h

Go to the documentation of this file.
00001 #ifndef SYSTEM_VALUES_CLASS
00002 #define SYSTEM_VALUES_CLASS
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : system_values                                                     *
00007 *  Author : Chris Koeritz                                                     *
00008 *                                                                             *
00009 *******************************************************************************
00010 * Copyright (c) 2004-$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/object_base.h>
00021 #include <data_struct/static_memory_gremlin.h>
00022 
00023 // forward.
00024 class system_values_lookup_list;
00025 
00027 
00037 class OPSYSTEM_CLASS_STYLE system_values : public virtual object_base
00038 {
00039 public:
00040   system_values(const istring &section_tag);
00042 
00055   virtual ~system_values();
00056 
00057   IMPLEMENT_CLASS_NAME("system_values");
00058 
00059   // these provide symbolic versions of the section tag used in the
00060   // constructor.  these are preferable to using the string constants
00061   // directly.
00062   static const char *OUTCOME_VALUES();
00064   static const char *FILTER_VALUES();
00066   static const char *EVENT_VALUES();
00068 
00069   static const char *DEFAULT_MANIFEST;
00071 
00073   bool use_other_manifest(const istring &manifest_file);
00075 
00078   virtual istring text_form() const;
00080 
00081   bool lookup(int value, istring &symbolic_name, istring &description,
00082           istring &file_location);
00084 
00091   bool lookup(const istring &symbolic_name, int &value, istring &description,
00092           istring &file_location);
00094 
00098   int elements() const;
00100 
00101   bool get(int index, istring &symbolic_name, int &value,
00102            istring &description, istring &file_location);
00104 
00105 private:
00106   istring *_tag;  
00107   system_values_lookup_list *_list;  
00108   istring *_file;  
00109 
00110   bool open_values();  
00111 };
00112 
00113 #endif
00114 

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