Connector Class Reference
[Connector implementation classes and data]

Abstract class for any type of Connector. More...

#include <connector.h>

Inheritance diagram for Connector:

Inheritance graph
[legend]
Collaboration diagram for Connector:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~Connector ()
virtual void disconnect ()=0
 Disconnect this connector.
virtual Dataread ()=0
 Add the "owning" object, which is to be notified of disconnections.
virtual ssize_t write (const Data &b)=0
 Write a blob of data to the underlying connection.
virtual std::string get_id () const =0
 Instance identification string (abstract virtual).
virtual bool connected () const =0
 Are we currently connected?

Static Protected Attributes

static const size_t BufSize = 4096


Detailed Description

Abstract class for any type of Connector.

Objects of this class (really, of a sublass of this class) contain the information necessary to open or establish a particular type of connection, such as a Unix-domain socket, a TCP socket, a file, or a memory buffer. These objects also codify how to handle disconnection, and how to read from and/or write to that connection.

Definition at line 65 of file connector.h.


Constructor & Destructor Documentation

virtual Connector::~Connector (  )  [inline, virtual]

Definition at line 71 of file connector.h.


Member Function Documentation

virtual void Connector::disconnect (  )  [pure virtual]

Disconnect this connector.

This function performs the connector- specific functions necessary for disconnection.

Note:
This function needs to be called by the class destructor at the same level(s) as the implementation of disconnect(). For any class that requires behavior coded into a disconnect() function, you must ensure that you call it from that classes destructor, otherwise it will have already been destructed when a super-classes destructor may call disconnect().

Implemented in FDConnector, History, LogFile, and TTYConnector.

virtual Data* Connector::read (  )  [pure virtual]

Add the "owning" object, which is to be notified of disconnections.

Implemented in FDConnector, History, and TTYConnector.

virtual ssize_t Connector::write ( const Data b  )  [pure virtual]

Write a blob of data to the underlying connection.

Implemented in FDConnector, History, and TTYConnector.

Referenced by socket_sender().

Here is the caller graph for this function:

virtual std::string Connector::get_id (  )  const [pure virtual]

Instance identification string (abstract virtual).

Implemented in FDConnector, History, LogFile, SocketConnector, and TTYConnector.

virtual bool Connector::connected (  )  const [pure virtual]

Are we currently connected?

Implemented in FDConnector, History, and TTYConnector.


Member Data Documentation

const size_t Connector::BufSize = 4096 [static, protected]

Used to size the read buffer. XXX - Probably doesn't belong here, but in some subclass.

Definition at line 116 of file connector.h.

Referenced by TTYConnector::read(), and FDConnector::read().


The documentation for this class was generated from the following file:

Generated on Tue May 13 11:32:45 2008 for consmgr by  doxygen 1.5.5