class libfwbuilder::BackgroundOp

Abstract class BackgroundOp represents operatioin executed in background

Inheritance:


Public Fields

[more]SigC::Signal1<int,int> completed

Public Methods

[more] BackgroundOp()
[more]virtual ~BackgroundOp()
[more]void detach(Pool<BackgroundOp>* p)
[more]virtual pthread_t start_operation(ostream* ) throw(FWException)
These methods are called to initiate and interrupt background operation, respectively
[more]virtual void stop_operation()
[more]bool get_running_flag()
[more]bool get_stop_program_flag()
[more]FWException* get_latest_error()
[more]gint monitor_operation()
This signal handler to be called externally from time to time to ensure that completed signal is issued when task is done.

Protected Fields

[more]FWException* error
[more]Pool<BackgroundOp> * pool
[more]Mutex pool_mutex

Protected Methods

[more]virtual void run_impl(Logger* ) throw(FWException) = 0
Implementation of actual operation.
[more]virtual void operation_completed()
BackgroundOp calls this method from background_thread when run_impl returns.
[more]void set_running_flag()
[more]void clear_running_flag()
[more]virtual void check_stop() throw(FWException)
[more]void clear_stop_program_flag()
User should never manipulate stop flag directly.
[more]void set_stop_program_flag()


Documentation

Abstract class BackgroundOp represents operatioin executed in background
oFWException* error

oPool<BackgroundOp> * pool

oMutex pool_mutex

ovirtual void run_impl(Logger* ) throw(FWException) = 0
Implementation of actual operation.

ovirtual void operation_completed()
BackgroundOp calls this method from background_thread when run_impl returns.

This method should call BackgroundOp::operation_complted and then perform any specific actions which need to be taken after operation finished. This may be destroying variables, sending report to the Logger, etc.

It should never be called directly.

ovoid set_running_flag()

ovoid clear_running_flag()

ovirtual void check_stop() throw(FWException)

ovoid clear_stop_program_flag()
User should never manipulate stop flag directly. he should use 'stop_operation' method instead.

ovoid set_stop_program_flag()

o BackgroundOp()

ovirtual ~BackgroundOp()

ovoid detach(Pool<BackgroundOp>* p)

ovirtual pthread_t start_operation(ostream* ) throw(FWException)
These methods are called to initiate and interrupt background operation, respectively

ovirtual void stop_operation()

obool get_running_flag()

obool get_stop_program_flag()

oFWException* get_latest_error()

ogint monitor_operation()
This signal handler to be called externally from time to time to ensure that completed signal is issued when task is done. typical way would be:

bio->start_operation(logger); Gtk::Main::idle.connect(SigC::slot(bio, &BackgroundOp::monitor_operation));

oSigC::Signal1<int,int> completed


Direct child classes:
SNMPQuery
SNMPCrawler
DNS
Friends:
void *background_thread(void *)

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.