Obtain the singleton hdsApp instance Pointer to the singleton HTML application NULL if the logger is not supplied
| Return Type | Function name | Arguments |
|---|---|---|
| hdsSphere* | hdsSphere::GetInstance | (hzLogger&,) |
Declared in file: hzDissemino.h
Defined in file : hdsCore.cpp
Function Logic:
Function body:
hdsSphere* hdsSphere::GetInstance (hzLogger& pLog)
{
// Category: Dissemino System Initialization
//
// Obtain the singleton hdsApp instance
//
// Arguments: 1) pLog Pointer to an established logger to log config errors and events
//
// Returns: Pointer to the singleton HTML application
// NULL if the logger is not supplied
_hzfunc("hdsSphere::GetInstance") ;
if (_hzGlobal_Sphere)
hzwarn(E_SETONCE, "hdsApp is a singleton class") ;
else
{
if (_hzGlobal_Webapp)
hzexit(E_CONFLICT, "Already an established Webapp") ;
_hzGlobal_Sphere = new hdsSphere() ;
if (!_hzGlobal_Sphere)
hzexit(E_MEMORY, "No allocation for Dissemino Sphere") ;
_hzGlobal_Sphere->m_pLog = &pLog ;
}
return _hzGlobal_Sphere ;
}