HGL::Common::Application Class Reference
[Utility classes]

Base class of a typical HGL Suite application. More...

#include <application.h>

Inheritance diagram for HGL::Common::Application:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Application (bool signals=true, bool initGPGMe=true)
 Application (const OBSERVERS &obs, bool signals=true, bool initGPGMe=true)
 Constructor.
bool hasTerminated () const
 Indicates if the application got a termination signal and should prepare to shutdown.
virtual bool notificationsAvailable () const
 Checks if notifications are available and enabled.
virtual void notifyError (const std::string &msg, NOTIFYOPT opt=DEFAULT, const std::string &summary=std::string()) const
 Emits an error desktop notification if possible.
virtual void notifyFatal (const std::string &msg, NOTIFYOPT opt=DEFAULT, const std::string &summary=std::string()) const
 Emits an fatal error desktop notification if possible.
virtual void notifyInfo (const std::string &msg, NOTIFYOPT opt=DEFAULT, const std::string &summary=std::string()) const
 Emits an information desktop notification if possible.
virtual void notifyWarn (const std::string &msg, NOTIFYOPT opt=DEFAULT, const std::string &summary=std::string()) const
 Emits a warning desktop notification if possible.
void registerApplicationObserver (const IApplicationObserver *const)
 Registers an IApplicationObserver.
void unregisterApplicationObserver (const IApplicationObserver *const)
 Unregisters an IApplicationObserver.

Detailed Description

Base class of a typical HGL Suite application.

Author:
Heiko Schäfer <heiko@hgl.rangun.de>

Constructor & Destructor Documentation

Application::Application ( const OBSERVERS &  obs,
bool  signals = true,
bool  initGPGMe = true 
)

Constructor.

Note:
the GPGMe subsystem is only needed if signing key actions are neccessary
Parameters:
obs an initial vector of IApplicationObserver to register
signals if true than signal handling will be enabled
initGPGMe if true than the GPGMe subsystem gets initialized
Application::Application ( bool  signals = true,
bool  initGPGMe = true 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.


Member Function Documentation

bool HGL::Common::Application::hasTerminated (  )  const [virtual]

Indicates if the application got a termination signal and should prepare to shutdown.

Returns:
true if the application shut prepare to shut down, false otherwise

Implements HGL::Common::IApplication.

bool Application::notificationsAvailable (  )  const [virtual]

Checks if notifications are available and enabled.

Returns:
true if notifications are available, false otherwise
Since:
0.5.25

Implements HGL::Common::IApplication.

void Application::notifyError ( const std::string &  msg,
NOTIFYOPT  opt = DEFAULT,
const std::string &  summary = std::string() 
) const [virtual]

Emits an error desktop notification if possible.

Parameters:
msg the message to display
opt behaviour option
summary an optional summary
Since:
0.5.25

Implements HGL::Common::IApplication.

void Application::notifyFatal ( const std::string &  msg,
NOTIFYOPT  opt = DEFAULT,
const std::string &  summary = std::string() 
) const [virtual]

Emits an fatal error desktop notification if possible.

Parameters:
msg the message to display
opt behaviour option
summary an optional summary
Since:
0.5.25

Implements HGL::Common::IApplication.

void Application::notifyInfo ( const std::string &  msg,
NOTIFYOPT  opt = DEFAULT,
const std::string &  summary = std::string() 
) const [virtual]

Emits an information desktop notification if possible.

Parameters:
msg the message to display
opt behaviour option
summary an optional summary
Since:
0.5.25

Implements HGL::Common::IApplication.

void Application::notifyWarn ( const std::string &  msg,
NOTIFYOPT  opt = DEFAULT,
const std::string &  summary = std::string() 
) const [virtual]

Emits a warning desktop notification if possible.

Parameters:
msg the message to display
opt behaviour option
summary an optional summary
Since:
0.5.25

Implements HGL::Common::IApplication.

void Application::registerApplicationObserver ( const IApplicationObserver iao  )  [virtual]

Registers an IApplicationObserver.

Parameters:
iao an IApplicationObserver to register

Implements HGL::Common::IApplication.

void Application::unregisterApplicationObserver ( const IApplicationObserver iao  )  [virtual]

Unregisters an IApplicationObserver.

Parameters:
iao an IApplicationObserver to unregister

Implements HGL::Common::IApplication.


Generated on 9 Apr 2014 for hgl 0.5.26~svn by  doxygen 1.6.1