Merge branch 'master' into InterAfrica

This commit is contained in:
2023-07-07 11:02:14 +02:00
2 changed files with 22 additions and 32 deletions

View File

@@ -27,10 +27,6 @@ CApplication::CApplication( EDebugLevel pLogLevel )
// Set signal handlers
ConfigureSignalHandlers();
DefinitionFile = NULL;
ConfigFile = NULL;
AddressFile = NULL;
// Create output logger
Log = new CLogCore( stdout, 5000 );
LogLevel = pLogLevel;
@@ -43,13 +39,6 @@ CApplication::CApplication( EDebugLevel pLogLevel )
AddressList = DataTree->GetChild( "AddressList", true );
JSONparser = new CJSONparse( DataTree );
// Selector
Selector = NULL;
// List
FirstFunctionType = NULL;
FirstFunction = NULL;
// Add Core Function Types
//AddFunctionType( TYPE_FUNCTION, NewFunctionCore ); // <-- Can't add virtual function
AddFunctionType( TYPE_SELECTABLE, NewSelectableCore );

View File

@@ -33,15 +33,15 @@ class Application;
//---------------------------------------------------------------------------
struct SFunctionType {
char * Name;
FFuncConstructor Constructor;
TFunctionType * Next;
char * Name = NULL;
FFuncConstructor Constructor = NULL;
TFunctionType * Next = NULL;
};
//---------------------------------------------------------------------------
struct SFunctionItem {
CFunctionCore * Function;
SFunctionItem * Next;
CFunctionCore * Function = NULL;
SFunctionItem * Next = NULL;
};
//---------------------------------------------------------------------------
@@ -49,32 +49,33 @@ class CApplication
{
protected:
// Variables used for configuration
char * ConfigFile;
char * DefinitionFile;
char * AddressFile;
char * ConfigFile = NULL;
char * DefinitionFile = NULL;
char * AddressFile = NULL;
char * BackupFolder = NULL;
// Configuration
CDataMember * DataTree;
CJSONparse * JSONparser = NULL;
CDataMember * DataTree = NULL;
CJSONparse * JSONparser = NULL;
// List
TFunctionType * FirstFunctionType;
TFunctionItem * FirstFunction;
TFunctionType * FirstFunctionType = NULL;
TFunctionItem * FirstFunction = NULL;
// Output
int LogBufSize;
EDebugLevel LogLevel;
int LogOutput;
int LogBufSize = 0;
EDebugLevel LogLevel = dlNone;
int LogOutput = loNone;
public:
// Public function vars
CLogCore * Log;
CSelect * Selector;
CLogCore * Log = NULL;
CSelect * Selector = NULL;
// Configuration
CDataMember * Config;
CDataMember * Definition;
CDataMember * AddressList;
CDataMember * Config = NULL;
CDataMember * Definition = NULL;
CDataMember * AddressList = NULL;
// Life Cycle
CApplication( EDebugLevel pDebugLevel );
@@ -88,7 +89,7 @@ public:
// Manually set configuration
bool SetLogParam( int pLogBufferSize, EDebugLevel pDebugLevel, int pOutputDisplay );
inline void WriteToScreen( const char * BasePath, const int Indent = 2 ) { JSONparser->WriteToScreen( BasePath, Indent ); };
inline void WriteToScreen( const char * BasePath, const int Indent = 2 ) { JSONparser->WriteToScreen( BasePath, Indent ); };
// Init application
bool InitApplication();