Mini application server API for C++.

 Overview   Project   Class   Tree   Deprecated   Index 
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

base
Class CzzApplication

   in zz_application.h
Direct Known Subclasses:
CzzConsoleApplication

class CzzApplication

Base for a application

Author:
Toni Thomsson, toni@tonjac.org

Field Summary
protected CzzArguments m_Arguments
          Argument map
protected CzzLog* m_Log
          Logger
protected CzzString m_Name
          Application name
protected static CzzApplication* m_pThis
          Singleton
 
Constructor Summary
CzzApplication( const CzzString& name )
          Creates a application object with a logger logging with given application name
virtual ~CzzApplication()
          
 
Method Summary
 static CzzApplication* getInstance( void )
          Returns the singleton object
 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 OnStart( void )
          Called by Run() when the application starts.
 virtual void OnUnhandledException( void )
          Called when a undefined exception is caught in main.
 void Run( CzzArguments& args )
          Called by the main() function if you link main.
 

Field Detail

m_Arguments

protected CzzArguments m_Arguments;
Argument map

m_Log

protected CzzLog* m_Log;
Logger

m_Name

protected CzzString m_Name;
Application name

m_pThis

protected static CzzApplication* m_pThis;
Singleton


Constructor Detail

CzzApplication

public CzzApplication( const CzzString& name );
Creates a application object with a logger logging with given application name
Parameters:
name - Name
See Also:
CzzLog

~CzzApplication

public virtual ~CzzApplication();


Method Detail

getInstance

public static CzzApplication* getInstance( void );
Returns the singleton object

OnEnd

public virtual void OnEnd( void );
Called by main when the before the application terminates. Default implementation releases the logger.

OnException

public virtual void OnException( CzzException& e );
Called when an CzzException is caught in main. Default implementation doesn't do anything.
Parameters:
e - Error

OnStart

public virtual void OnStart( void );
Called by Run() when the application starts. Default implementation just creates a logger (CzzLog).
See Also:
CzzLog

OnUnhandledException

public virtual void OnUnhandledException( void );
Called when a undefined exception is caught in main. Default implementation doesn't do anything.

Run

public void Run( CzzArguments& args );
Called by the main() function if you link main.obj to your application
Parameters:
args - Arguments to main

 Overview   Project   Class   Tree   Deprecated   Index 
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD