// Name: config.h
// Purpose: interface of wxConfigBase
// Author: wxWidgets team
-// RCS-ID: $Id$
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+
+// Flags for constructor style parameter
+enum
+{
+ wxCONFIG_USE_LOCAL_FILE = 1,
+ wxCONFIG_USE_GLOBAL_FILE = 2,
+ wxCONFIG_USE_RELATIVE_PATH = 4,
+ wxCONFIG_USE_NO_ESCAPE_CHARACTERS = 8,
+ wxCONFIG_USE_SUBDIR = 16
+};
+
+
/**
@class wxConfigBase
contain an arbitrary path (either relative or absolute), not just the
key name.
- @beginWxPythonOnly
- In place of a single overloaded method name, wxPython implements the
- following methods:
- - Read(key, default="") - Returns a string.
- - ReadInt(key, default=0) - Returns an integer.
- - ReadFloat(key, default=0.0) - Returns a floating point number.
- - ReadBool(key, default=0) - Returns a boolean.
- - Write(key, value) - Writes a string.
- - WriteInt(key, value) - Writes an int.
- - WriteFloat(key, value) - Writes a floating point number.
- @endWxPythonOnly
-
-
@library{wxbase}
@category{cfg}
/**
Gets the first entry.
- @beginWxPythonOnly
- The wxPython version of this method returns a 3-tuple consisting of the
- continue flag, the value string, and the index for the next call.
- @endWxPythonOnly
-
@beginWxPerlOnly
In wxPerl this method takes no parameters and returns a 3-element
list (continue_flag, string, index_for_getnextentry).
/**
Gets the first group.
- @beginWxPythonOnly
- The wxPython version of this method returns a 3-tuple consisting of the
- continue flag, the value string, and the index for the next call.
- @endWxPythonOnly
-
@beginWxPerlOnly
In wxPerl this method takes no parameters and returns a 3-element
list (continue_flag, string, index_for_getnextentry).
/**
Gets the next entry.
- @beginWxPythonOnly
- The wxPython version of this method returns a 3-tuple consisting of the
- continue flag, the value string, and the index for the next call.
- @endWxPythonOnly
-
@beginWxPerlOnly
In wxPerl this method only takes the @a index parameter and
returns a 3-element list (continue_flag, string,
/**
Gets the next group.
- @beginWxPythonOnly
- The wxPython version of this method returns a 3-tuple consisting of the
- continue flag, the value string, and the index for the next call.
- @endWxPythonOnly
-
@beginWxPerlOnly
In wxPerl this method only takes the @a index parameter and
returns a 3-element list (continue_flag, string,
/**
Reads a float value, returning @true if the value was found.
- With the second overload, if the value was not found, @a defaultVal is
- used instead.
+ If the value was not found, @a f is not changed.
Notice that the value is read as a double but must be in a valid range
for floats for the function to return @true.
Not supported by wxPerl.
@endWxPerlOnly
*/
- //@{
bool Read(const wxString& key, float* f) const;
+ /**
+ Reads a float value, returning @true if the value was found.
+
+ If the value was not found, @a defaultVal is used instead.
+
+ Notice that the value is read as a double but must be in a valid range
+ for floats for the function to return @true.
+
+ @since 2.9.1
+
+ @beginWxPerlOnly
+ Not supported by wxPerl.
+ @endWxPerlOnly
+ */
bool Read(const wxString& key, float* f, float defaultVal) const;
- //@}
/**
- Reads a float value, returning @true if the value was found. If the
+ Reads a boolean value, returning @true if the value was found. If the
value was not found, @a b is not changed.
@since 2.9.1
*/
bool Read(const wxString& key, bool* b) const;
/**
- Reads a bool value, returning @true if the value was found. If the
+ Reads a boolean value, returning @true if the value was found. If the
value was not found, @a defaultVal is used instead.
@beginWxPerlOnly
@library{wxbase}
@category{cfg}
*/
-class WXDLLIMPEXP_BASE wxConfigPathChanger
+class wxConfigPathChanger
{
public:
Returns the name of the key which was passed to the ctor.
The "name" is just anything which follows the last slash of the string given to the ctor.
*/
- const wxString& Name() const { return m_strName; }
+ const wxString& Name() const;
/**
This method must be called if the original path inside the wxConfig object