PString GetString( const PString & key ) const
- Get a string variable determined by the key in the section. If the
section name is not specified then the default section is used.
If the key is not present the value returned is the that provided by
the dlft parameter. Note that this is different from the
key being present but having no value, in which case an empty string is
returned.
- Parameters:
- - key The key name for the variable.
- Returns:
- string value of the variable.
PString GetString( const PString & key, const PString & dflt ) const
- Get a string variable determined by the key in the section.
- Parameters:
- - key The key name for the variable.
dflt - Default value for the variable.
PString GetString( const PString & section, const PString & key, const PString & dflt ) const
- Get a string variable determined by the key in the section.
- Parameters:
- section - Section to use instead of the default.
- key The key name for the variable.
dflt - Default value for the variable.
void SetString( const PString & key, const PString & value )
- Set a string variable determined by the key in the section. If the
section name is not specified then the default section is used.
- Parameters:
- - key The key name for the variable.
- value New value to set for the variable.
void SetString( const PString & section, const PString & key, const PString & value )
- Set a string variable determined by the key in the section.
- Parameters:
- section - Section to use instead of the default.
- key The key name for the variable.
- value New value to set for the variable.
BOOL GetBoolean( const PString & key, BOOL dflt = FALSE ) const
- Get a boolean variable determined by the key in the section. If the
section name is not specified then the default section is used.
The boolean value can be specified in a number of ways. The TRUE value
is returned if the string value for the variable begins with either the
'T' character or the 'Y' character. Alternatively if the string can
be converted to a numeric value, a non-zero value will also return TRUE.
Thus the values can be Key=True, Key=Yes or Key=1 for TRUE and
Key=False, Key=No, or Key=0 for FALSE.
If the key is not present the value returned is the that provided by
the dlft parameter. Note that this is different from the
key being present but having no value, in which case FALSE is returned.
- Parameters:
- - key The key name for the variable.
dflt - Default value for the variable.
- Returns:
- boolean value of the variable.
BOOL GetBoolean( const PString & section, const PString & key, BOOL dflt = FALSE ) const
- Get a boolean variable determined by the key in the section.
- Parameters:
- section - Section to use instead of the default.
- key The key name for the variable.
dflt - Default value for the variable.
void SetBoolean( const PString & key, BOOL value )
- Set a boolean variable determined by the key in the section. If the
section name is not specified then the default section is used.
If value is TRUE then the string "True" is written to the variable
otherwise the string "False" is set.
- Parameters:
- - key The key name for the variable.
- value New value to set for the variable.
void SetBoolean( const PString & section, const PString & key, BOOL value )
- Set a boolean variable determined by the key in the section.
- Parameters:
- section - Section to use instead of the default.
- key The key name for the variable.
- value New value to set for the variable.
void SetInteger( const PString & key, long value )
- Set an integer variable determined by the key in the section. If the
section name is not specified then the default section is used.
The value is always formatted as a signed number with no leading or
trailing blanks.
- Parameters:
- - key The key name for the variable.
- value New value to set for the variable.
void SetInteger( const PString & section, const PString & key, long value )
- Set an integer variable determined by the key in the section.
- Parameters:
- section - Section to use instead of the default.
- key The key name for the variable.
- value New value to set for the variable.
PInt64 GetInt64( const PString & key, PInt64 dflt = 0 ) const
- Get a 64 bit integer variable determined by the key in the section. If the
section name is not specified then the default section is used.
If the key is not present the value returned is the that provided by
the dlft parameter. Note that this is different from the
key being present but having no value, in which case zero is returned.
- Parameters:
- - key The key name for the variable.
dflt - Default value for the variable.
- Returns:
- integer value of the variable.
PInt64 GetInt64( const PString & section, const PString & key, PInt64 dflt = 0 ) const
- Get a 64 bit integer variable determined by the key in the section.
- Parameters:
- section - Section to use instead of the default.
- key The key name for the variable.
dflt - Default value for the variable.
void SetInt64( const PString & key, PInt64 value )
- Set a 64 bit integer variable determined by the key in the section. If the
section name is not specified then the default section is used.
The value is always formatted as a signed number with no leading or
trailing blanks.
- Parameters:
- - key The key name for the variable.
- value New value to set for the variable.
void SetInt64( const PString & section, const PString & key, PInt64 value )
- Set a 64 bit integer variable determined by the key in the section.
- Parameters:
- section - Section to use instead of the default.
- key The key name for the variable.
- value New value to set for the variable.
double GetReal( const PString & key, double dflt = 0 ) const
- Get a floating point variable determined by the key in the section. If
the section name is not specified then the default section is used.
If the key is not present the value returned is the that provided by
the dlft parameter. Note that this is different from the
key being present but having no value, in which case zero is returned.
- Parameters:
- - key The key name for the variable.
dflt - Default value for the variable.
- Returns:
- floating point value of the variable.
double GetReal( const PString & section, const PString & key, double dflt = 0 ) const
- Get a floating point variable determined by the key in the section.
- Parameters:
- section - Section to use instead of the default.
- key The key name for the variable.
dflt - Default value for the variable.
void SetReal( const PString & key, double value )
- Set a floating point variable determined by the key in the section. If
the section name is not specified then the default section is used.
The value is always formatted as a signed decimal or exponential form
number with no leading or trailing blanks, ie it uses the %g formatter
from the printf() function.
- Parameters:
- - key The key name for the variable.
- value New value to set for the variable.
void SetReal( const PString & section, const PString & key, double value )
- Set a floating point variable determined by the key in the section.
- Parameters:
- section - Section to use instead of the default.
- key The key name for the variable.
- value New value to set for the variable.
PTime GetTime( const PString & key ) const
- Get a PTime variable determined by the key in the section. If
the section name is not specified then the default section is used.
If the key is not present the value returned is the that provided by
the dlft parameter. Note that this is different from the
key being present but having no value, in which case zero is returned.
- Parameters:
- - key The key name for the variable.
- Returns:
- time/date value of the variable.
PTime GetTime( const PString & key, const PTime & dflt ) const
- Get a PTime variable determined by the key in the section.
- Parameters:
- - key The key name for the variable.
dflt - Default value for the variable.
PTime GetTime( const PString & section, const PString & key ) const
- Get a PTime variable determined by the key in the section.
- Parameters:
- section - Section to use instead of the default.
- key The key name for the variable.
PTime GetTime( const PString & section, const PString & key, const PTime & dflt ) const
- Get a PTime variable determined by the key in the section.
- Parameters:
- section - Section to use instead of the default.
- key The key name for the variable.
dflt - Default value for the variable.
void SetTime( const PString & key, const PTime & value )
- Set a PTime variable determined by the key in the section. If
the section name is not specified then the default section is used.
- Parameters:
- - key The key name for the variable.
- value New value to set for the variable.
void SetTime( const PString & section, const PString & key, const PTime & value )
- Set a PTime variable determined by the key in the section.
- Parameters:
- section - Section to use instead of the default.
- key The key name for the variable.
- value New value to set for the variable.