CzzApplication Class Reference

Base for a application. More...

#include <base/zz_application.h>

Inheritance diagram for CzzApplication:

CzzConsoleApplication List of all members.

Public Member Functions

 CzzApplication (const CzzString &name)
 Creates a application object with a logger logging with given application name.
virtual ~CzzApplication ()
void Run (CzzArguments &args)
 Called by the main() function if you link main.obj to your application.
virtual void OnStart (void)
 Called by Run() when the application starts.
virtual void OnEnd (void)
 Called by main when the before the application terminates.
virtual void OnException (CzzException &e)
 Called when an CzzException is caught in main.
virtual void OnUnhandledException (void)
 Called when a undefined exception is caught in main.

Static Public Member Functions

static CzzApplicationgetInstance (void)
 Returns the singleton object.

Protected Attributes

CzzLogm_Log
CzzArguments m_Arguments
CzzString m_Name

Static Protected Attributes

static CzzApplicationm_pThis = NULL

Detailed Description

Base for a application.

Author:
Toni Thomsson, toni@tonjac.org


Constructor & Destructor Documentation

CzzApplication::CzzApplication const CzzString name  ) 
 

Creates a application object with a logger logging with given application name.

See also:
CzzLog
Parameters:
name Name

CzzApplication::~CzzApplication  )  [virtual]
 


Member Function Documentation

CzzApplication * CzzApplication::getInstance void   )  [static]
 

Returns the singleton object.

Reimplemented in CzzConsoleApplication.

void CzzApplication::OnEnd void   )  [virtual]
 

Called by main when the before the application terminates.

Default implementation releases the logger.

virtual void CzzApplication::OnException CzzException e  )  [inline, virtual]
 

Called when an CzzException is caught in main.

Default implementation doesn't do anything.

Parameters:
e Error

void CzzApplication::OnStart void   )  [virtual]
 

Called by Run() when the application starts.

Default implementation just creates a logger (CzzLog).

See also:
CzzLog

virtual void CzzApplication::OnUnhandledException void   )  [inline, virtual]
 

Called when a undefined exception is caught in main.

Default implementation doesn't do anything.

void CzzApplication::Run CzzArguments args  ) 
 

Called by the main() function if you link main.obj to your application.

Parameters:
args Arguments to main


Member Data Documentation

CzzArguments CzzApplication::m_Arguments [protected]
 

CzzLog* CzzApplication::m_Log [protected]
 

CzzString CzzApplication::m_Name [protected]
 

CzzApplication * CzzApplication::m_pThis = NULL [static, protected]
 


The documentation for this class was generated from the following files:
Generated on Thu Sep 21 21:45:45 2006 for tonjac.org MINI/C++ library by  doxygen 1.4.6-NO