14#if !defined(OWL_CONFIGFL_H)
18#if defined(BI_HAS_PRAGMA_ONCE)
149 static bool StringToBool(
LPCTSTR str,
bool*
val);
261 virtual void UpdateFile();
270 using TConfigFile::ReadSection;
271 using TConfigFile::ReadSections;
272 using TConfigFile::EraseSection;
273 using TConfigFile::EraseEntry;
275 using TConfigFile::ReadString;
276 using TConfigFile::WriteString;
277 using TConfigFile::ReadData;
278 using TConfigFile::WriteData;
288class TMemConfigFileSections;
291 TMemConfigFileSections* Sections;
304 virtual void UpdateFile();
311 using TConfigFile::ReadSection;
312 using TConfigFile::ReadSections;
313 using TConfigFile::EraseSection;
314 using TConfigFile::EraseEntry;
316 using TConfigFile::ReadString;
317 using TConfigFile::WriteString;
341 virtual void UpdateFile();
352 using TConfigFile::SectionExists;
353 using TConfigFile::ReadSection;
354 using TConfigFile::ReadSections;
355 using TConfigFile::EraseSection;
356 using TConfigFile::EraseEntry;
358 using TConfigFile::ReadInteger;
359 using TConfigFile::WriteInteger;
360 using TConfigFile::ReadString;
361 using TConfigFile::WriteString;
362 using TConfigFile::ReadData;
363 using TConfigFile::WriteData;
Class wrapper for management of color values.
Save/Load configuration parameters Base abstract class.
TConfigFile(const tstring &name)
Constructs instance and sets FileName to name.
virtual bool WriteData(LPCTSTR section, LPCTSTR entry, void *buffer, uint size)
This method writes binary data.
static int DefaultPrecision
bool ReadTime(LPCTSTR section, LPCTSTR entry, TTime &val) const
virtual bool EraseSection(LPCTSTR section)=0
bool ReadColor(LPCTSTR section, LPCTSTR entry, TColor &color) const
This method reads an RGB color.
double ReadDouble(LPCTSTR section, LPCTSTR entry, double defval=0.0) const
virtual bool WriteInteger(LPCTSTR section, LPCTSTR entry, int value)
This method writes an integer. We format it as a string.
bool WriteRect(LPCTSTR section, LPCTSTR entry, const TRect &rc)
This method writes a rectangle.
static int GetPrecision()
bool ReadDate(LPCTSTR section, LPCTSTR entry, TDate &value) const
virtual bool SectionExists(LPCTSTR section) const
bool WriteFont(LPCTSTR section, LPCTSTR entry, const LOGFONT &font)
This method writes a font description in the following format:
virtual ~TConfigFile()
Destroys the instance.
bool WriteColor(LPCTSTR section, LPCTSTR entry, const TColor &clr)
This method writes an RGB color.
bool ReadPoint(LPCTSTR section, LPCTSTR entry, TPoint &val) const
bool WriteDouble(LPCTSTR section, LPCTSTR entry, double value)
This method writes an integer.
const tstring & GetFileName() const
virtual uint ReadSections(TCHAR *sections, uint bufSize) const =0
virtual bool EraseEntry(LPCTSTR section, LPCTSTR entry)=0
bool WriteTime(LPCTSTR section, LPCTSTR entry, TTime &val)
bool WriteDate(LPCTSTR section, LPCTSTR entry, const TDate &val)
bool WriteSystemTime(LPCTSTR section, LPCTSTR entry, const TSystemTime &val)
static void SetPrecision(int newprec=-1)
bool ReadSize(LPCTSTR section, LPCTSTR entry, TSize &sz) const
virtual void UpdateFile()=0
bool ReadBool(LPCTSTR section, LPCTSTR entry, bool defval=false) const
This method reads a boolean value.
bool ReadRect(LPCTSTR section, LPCTSTR entry, TRect &val) const
This method reads a rectangle.
bool WritePoint(LPCTSTR section, LPCTSTR entry, const TPoint &point)
This method writes a TPoint.
virtual uint ReadSection(LPCTSTR section, TCHAR *buffer, uint bufSize) const =0
virtual int ReadInteger(LPCTSTR section, LPCTSTR entry, int defint=0) const
This method reads an integer.
bool WriteSize(LPCTSTR section, LPCTSTR entry, const TSize &size)
This method writes a TSize.
bool ReadFont(LPCTSTR section, LPCTSTR entry, LOGFONT &font) const
This method will take a profile string of the form:
virtual bool ReadData(LPCTSTR section, LPCTSTR entry, void *buffer, uint size) const
This method reads binary data.
bool WriteBool(LPCTSTR section, LPCTSTR entry, bool val)
This method writes a bool.
uint ReadString(const tstring §ion, const tstring &entry, tstring &buffer, const tstring &defstr) const
bool ReadSystemTime(LPCTSTR section, LPCTSTR entry, TSystemTime &val) const
virtual bool WriteString(LPCTSTR section, LPCTSTR entry, LPCTSTR value)=0
virtual uint ReadString(LPCTSTR section, LPCTSTR entry, TCHAR *buffer, uint bufSize, LPCTSTR defstr=0) const =0
Small inline wrapper around Section.
bool WriteRect(LPCTSTR entry, const TRect &rc)
bool WriteSize(LPCTSTR entry, const TSize &size)
bool ReadData(LPCTSTR entry, void *buffer, uint size) const
int ReadInteger(LPCTSTR entry, int defint=0) const
TConfigFileSection(TConfigFile &file, const tstring §ion)
bool ReadFont(LPCTSTR entry, LOGFONT &font) const
double ReadDouble(LPCTSTR entry, double defval) const
bool WriteString(LPCTSTR entry, LPCTSTR value)
bool ReadTime(LPCTSTR entry, TTime &val) const
bool ReadDate(LPCTSTR entry, TDate &value) const
bool WriteTime(LPCTSTR entry, TTime &val)
bool ReadRect(LPCTSTR entry, TRect &val) const
bool WriteInteger(LPCTSTR entry, int value)
uint ReadString(LPCTSTR entry, TCHAR *buffer, uint bufSize, LPCTSTR defstr=0) const
bool WriteData(LPCTSTR entry, void *buffer, uint size)
bool WriteBool(LPCTSTR entry, bool val)
bool EraseEntry(LPCTSTR entry)
const tstring & GetSection()
bool WriteFont(LPCTSTR entry, const LOGFONT &font)
uint ReadString(const tstring &entry, tstring &buffer, const tstring &defstr) const
bool WritePoint(LPCTSTR entry, const TPoint &point)
bool ReadColor(LPCTSTR entry, TColor &color) const
bool ReadPoint(LPCTSTR entry, TPoint &val) const
bool WriteSystemTime(LPCTSTR entry, const TSystemTime &val)
bool WriteDate(LPCTSTR entry, const TDate &val)
bool WriteDouble(LPCTSTR entry, double defval)
bool WriteColor(LPCTSTR entry, const TColor &clr)
bool ReadSystemTime(LPCTSTR entry, TSystemTime &val) const
bool ReadSize(LPCTSTR entry, TSize &sz) const
bool ReadBool(LPCTSTR entry, bool defval) const
The TDate class represents a date.
Encapsulates the Windows INI file interface Get/SetPrivateProfileXXX functions.
virtual ~TIniConfigFile()
TIniConfigFile(const tstring &name)
TPoint is a support class, derived from tagPOINT.
TRect is a mathematical class derived from tagRect.
Derived from TConfigFile, TRegConfigFile is used to maintain configuration settings in the registry.
Encapsulates a registration key in the Windows Registry.
The tagSIZE struct is defined as.
TSystemTime is a class derived from the structure SYSTEMTIME.
The TTime class encapsulates time functions and characteristics.
Object Windows Library (OWLNext Core)
General definitions used by all ObjectWindows programs.
General Registry access & registration implementation TRegKey, TRegValue, TRegKeyIterator,...