#include <mobu-python-api.h>
Interface to the application config files.
This class allows client code to generate, modify and query configuration files. Config files will be automatically created when needed. They will be located in the /bin/config folder or an explicitly specified folder depending on the constructor used.
Public Member Functions | |
__reduce__ () | |
__init__ (...) | |
ClearFile (FBConfigFile arg1) | |
Remove all content from the config file. More... | |
str | Get (FBConfigFile arg1, str arg2, str arg3, str arg4) |
Get an item's value. More... | |
tuple | GetOrSet (FBConfigFile arg1, str arg2, str arg3, str arg4, str arg5) |
Get a value from the config file and set it if it was not found. More... | |
bool | Set (FBConfigFile arg1, str arg2, str arg3, str arg4, str arg5) |
Set an item's value. More... | |
__init__ | ( | ... | ) |
Python Docstring:
__init__( (object)arg1, (str)arg2 [, (object)arg3 [, (object)arg4]]) -> None __init__( (object)arg1, (str)arg2, (str)arg3 [, (object)arg4 [, (object)arg5]]) -> None
C++ Constructors:
The reference documentation for the following C++ symbols may contain additional relevant information.
__reduce__ | ( | ) |
ClearFile | ( | FBConfigFile | arg1 | ) |
Remove all content from the config file.
Python Docstring:
ClearFile( (FBConfigFile)arg1) -> None
C++ Signature:
void ClearFile()
str Get | ( | FBConfigFile | arg1, |
str | arg2, | ||
str | arg3, | ||
str | arg4 | ||
) |
Get an item's value.
Python Docstring:
Get( (FBConfigFile)arg1, (str)arg2, (str)arg3 [, (str)arg4]) -> str
C++ Signature:
const char * Get(const char * pSectionName, const char * pItemName, const char * pDefaultValue = 0)
Get an item's value by looking inside a specific section of the config file.
pSectionName | Name of the section. |
pItemName | Name of the item. |
pDefaultValue | Default value that will be returned if the item is not found. |
tuple GetOrSet | ( | FBConfigFile | arg1, |
str | arg2, | ||
str | arg3, | ||
str | arg4, | ||
str | arg5 | ||
) |
Get a value from the config file and set it if it was not found.
Python Docstring:
GetOrSet( (FBConfigFile)arg1, (str)arg2, (str)arg3, (str)arg4 [, (str)arg5]) -> tuple
C++ Signature:
bool GetOrSet(const char * pSectionName, const char * pItemName, const char *& pValue, const char * pComment = 0)
pSectionName | Name of the section. |
pItemName | Name of the item. |
pValue | Reference the the string that will contain the value of the item. If the item is not found in the file, it will be added with the initial value in this string. |
pComment | Optional parameter that can be used to add a comment. |
bool Set | ( | FBConfigFile | arg1, |
str | arg2, | ||
str | arg3, | ||
str | arg4, | ||
str | arg5 | ||
) |
Set an item's value.
Python Docstring:
Set( (FBConfigFile)arg1, (str)arg2, (str)arg3, (str)arg4 [, (str)arg5]) -> bool
C++ Signature:
bool Set(const char * pSectionName, const char * pItemName, const char * pValue, const char * pComment = 0)
Assign a value to an item in the config file. If the item does not exist, it will be created.
pSectionName | Name of the section. |
pItemName | Name of the item. |
pValue | Value assigned to the item. |
pComment | Optional parameter that can be used to add a comment. |