Almetare  1.15
Alle meine Taschenrechner - Eine C++-Bibliothek zur Entwicklung von Taschenrechnern
cfgs.h
gehe zur Dokumentation dieser Datei
1 //******************************************************************************
2 // Copyright (c) 2002-2004 by Friedemann Seebass, Germany.
3 // Dieses Programm ist freie Software. Siehe GNU GPL Notiz in Datei main.cpp.
4 // This program is free software. See the GNU GPL notice in file main.cpp.
5 // Projekt: Almetare - Alle meine Taschenrechner
6 //******************************************************************************
10 //******************************************************************************
11 // Wann Wer Was
12 // ---------- -------- ---------------------------------------------------------
13 // 12.11.2003 fse neue Member-Variable mAlwaysOnTop
14 // 11.05.2003 fse wegen Dateiumbenennung Inklusion von config.h durch
15 // confg.h ersetzt
16 // 27.11.2001 fse erzeugt
17 //******************************************************************************
18 
19 #ifndef CFGS_H
20 #define CFGS_H
21 
22 #ifndef __cplusplus
23 #error cfgs.h is only for C++!
24 #endif
25 
26 //******************************************************************************
27 
28 #include <string>
29 #include "confg.h"
30 
31 using namespace std;
32 
33 //******************************************************************************
34 // Klasse mit allen konfigurierbaren Parametern:
35 //******************************************************************************
36 
37 enum DisplayMode { MORE_REALISTIC, REALISTIC, SIMPLE, DEBG };
38 
45 // fse, 01.10.02
46 
47 class Cfgs
48 {
49  string mCfgFileName;
50  string mProgName;
51  string mProgVers;
52  void setDefaults();
53  int writeDefaultCfgFile();
54  const string displayModeToStr(DisplayMode dm) const;
55  const string boolToStr(bool bl) const;
56  DisplayMode strToDisplayMode(const string& str) const;
57  bool strToBool(const string& str) const;
58 
59 public:
60  DisplayMode mDisplayMode;
61  int mXpos;
62  int mYpos;
63  int mWidth;
64  int mHeight;
65  bool mAlwaysOnTop;
66  int mZoom;
67  bool mShowHint;
69  bool mLogMode;
70  string mNvRam;
71  string mBrowserPath;
72  string mOnlLogFile;
73  string mDbgLogFile;
74  string mErrLogFile;
75  int mMaxLogLen;
79  string mExclFileToLog;
80 
81  Cfgs(string accPath, string cfgFileName, string progName, string progVers);
82  int readCfgFile();
83  bool readParam (Config& cfg, const string& param, string& val, const string& section) const;
84  bool writeParam(Config& cfg, const string& param, const string& val, const string& section) const;
85  void updtCfgFile();
86  void startStopLogging();
87 };
88 
89 //******************************************************************************
90 //******************************************************************************
91 //************************************** ***************************************
92 //************************* ************************* **************************
93 
94 #endif // CFGS_H
string mOnlLogFile
Pfad und Dateiname fuer Online-Logging.
Definition: cfgs.h:72
int mYpos
vertikale Position des Rechnerdialogs
Definition: cfgs.h:62
int mWidth
Breite des Rechnerdialogs.
Definition: cfgs.h:63
string mNvRam
"non volatile" RAM (Speicher, Winkelmodus, ...)
Definition: cfgs.h:70
string mErrLogFile
Pfad und Dateiname fuer Error-Logging.
Definition: cfgs.h:74
string mDbgLogFile
Pfad und Dateiname fuer Debug-Logging.
Definition: cfgs.h:73
bool mShowToolTips
Flag, ob Tooltips gezeigt werden.
Definition: cfgs.h:68
string mBrowserPath
Pfad zum HTML-Browser fuer die Hilfe.
Definition: cfgs.h:71
Anzeigeart des Rechners.
Definition: cfgs.h:47
int mXpos
horizontale Position des Rechnerdialogs
Definition: cfgs.h:61
Klasse zum Einlesen/Schreiben von Windows-Ini-Dateien.
Definition: confg.h:96
int mHeight
Hoehe des Rechnerdialogs.
Definition: cfgs.h:64
string mProgVers
Version d. Prgrms., zu dem die Datei gehoert.
Definition: cfgs.h:51
bool mAlwaysOnTop
Flag, ob Dialog immer im Vordergrund.
Definition: cfgs.h:65
Klasse zum Einlesen/Schreiben von Windows-Ini-Dateien (Modul lib).
string mExclFileToLog
Dateiname der einzigen Log-Datei.
Definition: cfgs.h:79
bool mShowHint
Flag, ob Hinweis auf Hilfe gezeigt wird.
Definition: cfgs.h:67
string mProgName
Name des Programms, zu dem die Datei gehoert.
Definition: cfgs.h:50
int mMaxLogLen
Maximale Groesse einer Log-Datei.
Definition: cfgs.h:75
bool mLogMode
Flag, ob Logging eingeschaltet ist.
Definition: cfgs.h:69
int mErrChannels
Error-Logging : konfigurierte Kanaele.
Definition: cfgs.h:78
int mOnlChannels
Online-Logging: konfigurierte Kanaele.
Definition: cfgs.h:76
int mZoom
kein echter Parameter, nur Zwischenspeicher
Definition: cfgs.h:66
string mCfgFileName
Name der Konfigurationsdatei.
Definition: cfgs.h:49
int mDbgChannels
Debug-Logging : konfigurierte Kanaele.
Definition: cfgs.h:77