FBConfigFile Class Reference
 
 
 
FBConfigFile Class Reference

This reference page is linked to from the following overview topics: Character Marker Set.


#include <mobu-python-api.h>


Class Description

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

def  __reduce__ ()
def  __init__ ()
def  ClearFile ()
def  Get ()
def  GetOrSet ()
def  Set ()

Member Function Documentation

def __reduce__ ( )
def __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.

 FBConfigFile(const FBConfigFile & )
 FBConfigFile(const char * pConfigFileName, bool pVirtualMode = false, bool pClearFile = false)
 FBConfigFile(const char * pConfigFileName, const char * pConfigFilePath, bool pVirtualMode = false, bool pClearFile = false)
def ClearFile ( )

Python Docstring:

ClearFile( (FBConfigFile)arg1) -> None 

C++ Signature:

void ClearFile() 

Remove all content from the config file.

def Get ( )

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. Get an item's value by looking inside a specific section of the config file.

Parameters:
pSectionName Name of the section.
pItemName Name of the item.
pDefaultValue Default value that will be returned if the item is not found.
Returns:
The value assigned to the item in the specified section of the config file, or the default value if not found.
def GetOrSet ( )

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) 

Get a value from the config file and set it if it was not found.

Parameters:
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.
Returns:
true if the value was found or added, or false if the item was not found and could not be added to the file.
def Set ( )

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) 

Set an item's value. Assign a value to an item in the config file. If the item does not exist, it will be created.

Parameters:
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.
Returns:
true if the item was written to the config file, false otherwise.