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

GFC::G::IOSource Class Reference

A input/output GSource C++ interface. More...

#include <gfc/glib/main.hh>

Inheritance diagram for GFC::G::IOSource:

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

Public Types

Public Member Functions

Constructors
Methods

Detailed Description

A input/output GSource C++ interface.

IOSource is a source that's dispatched when condition is met for the io channel. For example, if condition is G::IO_IN, the source will be dispatched when there's data available for reading. If the IOSlot returns false it is automatically removed from the list of event sources and will not be called again.


Member Typedef Documentation

typedef sigc::slot<bool, IOChannel&, IOConditionField> GFC::G::IOSource::IOSlot
 

Signature of the callback slot to be called when the requested condition on a IOChannel is satisfied.

Example: Method signature for IOSlot.

             bool method(IOChannel& source, IOConditionField condition);
             // source: The IOChannel event source.
             // condition: The condition which has been satisfied.
             // return: The slot should return false if the event source should be removed.


Constructor & Destructor Documentation

GFC::G::IOSource::IOSource G::IOChannel channel,
G::IOConditionField  condition
 

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

Parameters:
channel A G::IOChannel.
condition The condition to watch for.

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_DEFAULT you can call set_priority().

GFC::G::IOSource::IOSource G::IOChannel channel,
G::IOConditionField  condition,
const IOSlot slot
 

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

Parameters:
channel A G::IOChannel.
condition The condition to watch for.
slot The callback slot, of type sigc::slot<bool, IOChannel&, IOConditionField>.

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


Member Function Documentation

void GFC::G::IOSource::set_callback const IOSlot slot  ) 
 

Sets the callback slot for the io source.

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


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