GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

GFC::G::TimeoutSource Class Reference

A timeout GSource C++ interface. More...

#include <gfc/glib/main.hh>

Inheritance diagram for GFC::G::TimeoutSource:

GFC::G::Source GFC::Trackable List of all members.

Public Types

Public Member Functions

Constructors
Methods

Detailed Description

A timeout GSource C++ interface.

TimeoutSource is a source that's called at regular intervals, with the given priority. The TimeoutSlot is called repeatedly until it returns false, at which point the timeout is automatically destroyed and will not be called again. The first call to the slot will be at the end of the first interval.


Member Typedef Documentation

typedef sigc::slot<bool> GFC::G::TimeoutSource::TimeoutSlot
 

Signature of the callback slot to passed to TimeoutSource.

Example: Method signature for TimeoutSlot.

             bool method();
             // return: The slot should return false if the source should be removed.


Constructor & Destructor Documentation

GFC::G::TimeoutSource::TimeoutSource unsigned int  interval  ) 
 

Constructs a new timeout source that can be associated with any main context.

Parameters:
interval The time between calls to the function, in milliseconds.

G::Source::attach() must be called to attach the source to a context. To set the callback slot call set_callback(). To override the default priority PRIORITY_HIGH call set_priority().

GFC::G::TimeoutSource::TimeoutSource const TimeoutSlot slot,
unsigned int  interval
 

Constructs a new timeout source that can be associated with any main context.

Parameters:
slot The callback slot, of type sigc::slot<bool>.
interval The time between calls to the function, in milliseconds.

G::Source::attach() must be called to attach the source to a context. To override the default priority PRIORITY_HIGH call set_priority().


Member Function Documentation

void GFC::G::TimeoutSource::set_callback const TimeoutSlot slot  ) 
 

Sets the callback slot for the timeout source.

Parameters:
slot The callback slot, of type sigc::slot<bool>.


The documentation for this class was generated from the following file:
Generated on Tue Aug 24 00:04:57 2004 for GFC-Core by doxygen 1.3.8