31 #ifndef PTLIB_CONFIG_H
32 #define PTLIB_CONFIG_H
373 template <
typename Enumeration>
377 )
const {
return (Enumeration)
GetInteger(key, dflt); }
379 template <
typename Enumeration>
384 )
const {
return (Enumeration)
GetInteger(section, key, dflt); }
392 template <
typename Enumeration>
398 template <
typename Enumeration>
549 #include "msos/ptlib/config.h"
551 #include "unix/ptlib/config.h"
555 #endif // P_CONFIG_FILE
557 #endif // PTLIB_CONFIG_H
virtual void DeleteKey(const PString &key)
Delete the particular variable in the specified section.
virtual PBoolean GetBoolean(const PString &key, PBoolean dflt=false) const
Get a boolean variable determined by the key in the section.
virtual void SetReal(const PString &key, double value)
Set a floating point variable determined by the key in the section.
virtual void SetString(const PString &key, const PString &value)
Set a string variable determined by the key in the section.
This class defines an absolute time and date.
Definition: ptime.h:49
Enumeration GetEnum(const PString &key, Enumeration dflt) const
Definition: config.h:374
A class representing a configuration for the application.
Definition: config.h:62
virtual PStringToString GetAllKeyValues() const
Get all of the keys in the section and their values.
This is a dictionary collection class of PString objects, keyed by another string.
Definition: pstring.h:3151
This class describes a full description for a file on the particular platform.
Definition: filepath.h:61
virtual void SetBoolean(const PString &key, PBoolean value)
Set a boolean variable determined by the key in the section.
virtual PBoolean HasKey(const PString &key) const
Determine if the particular variable in the section is actually present.
PConfig(Source src=Application)
Create a new configuration object.
virtual void SetDefaultSection(const PString §ion)
Set the default section for variable operations.
This is an array collection class of PString objects.
Definition: pstring.h:2365
The application specific configuration file.
Definition: config.h:91
virtual PString GetString(const PString &key) const
Get a string variable determined by the key in the section.
virtual PStringArray GetSections() const
Get all of the section names currently specified in the file.
The platform specific environment.
Definition: config.h:76
virtual void SetInteger(const PString &key, long value)
Set an integer variable determined by the key in the section.
Source
Description of the standard source for configuration information.
Definition: config.h:71
virtual PTime GetTime(const PString &key) const
Get a PTime variable determined by the key in the section.
virtual void SetInt64(const PString &key, PInt64 value)
Set a 64 bit integer variable determined by the key in the section.
bool PBoolean
Definition: object.h:174
void SetEnum(const PString §ion, const PString &key, Enumeration value)
Set an enum variable determined by the key in the section.
Definition: config.h:399
The character string class.
Definition: pstring.h:108
The platform specific system wide configuration file.
Definition: config.h:82
static const PString & DefaultSectionName()
virtual void DeleteSection()
Delete all variables in the specified section.
virtual PString GetDefaultSection() const
Get the default section for variable operations.
PString defaultSection
The current section for variable values.
Definition: config.h:532
Enumeration GetEnum(const PString §ion, const PString &key, Enumeration dflt) const
Definition: config.h:380
virtual PInt64 GetInt64(const PString &key, PInt64 dflt=0) const
Get a 64 bit integer variable determined by the key in the section.
virtual void SetTime(const PString &key, const PTime &value)
Set a PTime variable determined by the key in the section.
virtual double GetReal(const PString &key, double dflt=0) const
Get a floating point variable determined by the key in the section.
void SetEnum(const PString &key, Enumeration value)
Set an enum variable determined by the key in the section.
Definition: config.h:393
virtual PStringArray GetKeys() const
Get a list of all the keys in the section.
virtual long GetInteger(const PString &key, long dflt=0) const
Ultimate parent class for all objects in the class library.
Definition: object.h:2204