Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

VTQL::Event_generic Class Reference

For handling connection in event mode, you will need a connection provieded by this class. More...

#include <vtql_event.h>

Inheritance diagram for VTQL::Event_generic:

VTQL::Connect List of all members.

Public Methods

virtual ~Event_generic ()
 Event_generic (const std::string &file_name)
 Open a connection to a server. More...

 Event_generic (const sock::Socket_basic &file_descriptor)
 Open a connection to a server (advanced). More...

virtual bool Process (bool block)
 This method gets called the event moduls. More...


Detailed Description

For handling connection in event mode, you will need a connection provieded by this class.

Usually you do only care about make an instance of this class and pass it to the event moduls. The only non-trivial method in this class is the Event_generic::Process(bool) function which tries to spot the kind of event arriving and counts the lines of every event.


Constructor & Destructor Documentation

VTQL::Event_generic::Event_generic const std::string &    file_name [inline]
 

Open a connection to a server.

As you may suspect, this connection has to be in event mode.

Parameters:
file_name  File name of a socket of VTQLserver.

VTQL::Event_generic::Event_generic const sock::Socket_basic   file_descriptor [inline]
 

Open a connection to a server (advanced).

If you have an file descriptor and it is connected to a server, you can use this constructor. As you may suspect, the connection has to be in event mode.

Parameters:
file_descriptor  A file descriptor that is connected to a VTQLserver.
See also:
sock::Socket_basic::Socket_basic(int), sock::Socket_basic::operator int()


Member Function Documentation

virtual bool VTQL::Event_generic::Process bool    block [virtual]
 

This method gets called the event moduls.

This method handles the incomming data and sends anything in the output queue. It calls the callbacks, where the argument pair means (line number,line content), starting with line number 1.

Parameters:
block  true: blocking ; false: nonblocking i/o
Returns:
true if a event has been completly read.

Implements VTQL::Connect.


The documentation for this class was generated from the following file:
Generated on Sun Apr 14 17:37:04 2002 for libvtql by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002