Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Connection< SAMPLE > Class Template Reference

#include <Connection.h>

Inheritance diagram for Connection< SAMPLE >:

Inheritance graph
[legend]
Collaboration diagram for Connection< SAMPLE >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class SAMPLE>
class Connection< SAMPLE >

Connection Interface (5.1.1.1) disconnect() Disconnect Connection from Connector getName(): string Get Connections Name sent from Header.

readable(): booleanCan this connection be read from. Not to be confused with polling for data. writable(): booleanCan this connection be written to? Not to be confused with polling for non blocking writes. write(data:byte [],size: int)Writes data out to connection. read(data:byte [],maxsize: int)Reads data from a connection.

Definition at line 17 of file Connection.h.

Public Methods

virtual void disconnect ()
 Disconnect the current connection.

virtual string getName ()
 Get the Connection's Name.

virtual bool readable ()
 Is the connection readable.

virtual bool writable ()
 Is the connection writable;.

virtual int write (const SAMPLE *data, int size)
 write size samples of data to the Connection

virtual int read (SAMPLE *data, int size)
 read size samples into data from the Connection

virtual int getFileHandle ()
 gets the file Handle of this connection

virtual string getType ()
 get the string type reprentation

virtual void setType (string type)
 set the string type

 Connection ()
 Basic constructor.

 Connection (BufferedFile *fd)
 Constructor which initalizes with the buffered file.

 Connection (BufferedFile *fd, string name)
 Constructor which initalizes with the buffered file and name.

virtual ~Connection ()
 Destructor.

virtual bool readReady ()
 Is the connection ready to read w/o blocking.

virtual int getDataSize ()
 get the number of bytes per sample of this connection type.

virtual bool writeReady ()
 Is the connection ready to write w/o blocking.


Protected Methods

void init (BufferedFile *fd, string name)

Protected Attributes

string type
string connectionName
BufferedFilefile


Constructor & Destructor Documentation

template<class SAMPLE>
Connection< SAMPLE >::Connection   [inline]
 

Basic constructor.

Definition at line 76 of file Connection.h.

template<class SAMPLE>
Connection< SAMPLE >::Connection BufferedFile   fd [inline]
 

Constructor which initalizes with the buffered file.

Definition at line 82 of file Connection.h.

template<class SAMPLE>
Connection< SAMPLE >::Connection BufferedFile   fd,
string    name
[inline]
 

Constructor which initalizes with the buffered file and name.

Definition at line 88 of file Connection.h.

template<class SAMPLE>
virtual Connection< SAMPLE >::~Connection   [inline, virtual]
 

Destructor.

Definition at line 94 of file Connection.h.


Member Function Documentation

template<class SAMPLE>
virtual void Connection< SAMPLE >::disconnect   [inline, virtual]
 

Disconnect the current connection.

Reimplemented in FilterConnection< SAMPLE >, FilterConnection< double >, FilterConnection< float >, FilterConnection< short >, and FilterConnection< char >.

Definition at line 22 of file Connection.h.

Referenced by FilterConnection< char >::disconnect().

template<class SAMPLE>
virtual int Connection< SAMPLE >::getDataSize   [inline, virtual]
 

get the number of bytes per sample of this connection type.

Definition at line 107 of file Connection.h.

template<class SAMPLE>
virtual int Connection< SAMPLE >::getFileHandle   [inline, virtual]
 

gets the file Handle of this connection

Reimplemented in ConfigConnection.

Definition at line 58 of file Connection.h.

template<class SAMPLE>
virtual string Connection< SAMPLE >::getName   [inline, virtual]
 

Get the Connection's Name.

Definition at line 28 of file Connection.h.

Referenced by FilterConnection< char >::getXML().

template<class SAMPLE>
virtual string Connection< SAMPLE >::getType   [inline, virtual]
 

get the string type reprentation

Reimplemented in ConfigConnection.

Definition at line 64 of file Connection.h.

template<class SAMPLE>
void Connection< SAMPLE >::init BufferedFile   fd,
string    name
[inline, protected]
 

Definition at line 120 of file Connection.h.

Referenced by Connection< char >::Connection(), and FilterConnection< char >::FilterConnection().

template<class SAMPLE>
virtual int Connection< SAMPLE >::read SAMPLE *    data,
int    size
[inline, virtual]
 

read size samples into data from the Connection

Reimplemented in FilterConnection< SAMPLE >, FilterConnection< double >, FilterConnection< float >, FilterConnection< short >, and FilterConnection< char >.

Definition at line 52 of file Connection.h.

Referenced by FilterConnection< char >::read().

template<class SAMPLE>
virtual bool Connection< SAMPLE >::readable   [inline, virtual]
 

Is the connection readable.

Reimplemented in OutputConnection< SAMPLE >.

Definition at line 34 of file Connection.h.

Referenced by FilterConnection< char >::connectFrom().

template<class SAMPLE>
virtual bool Connection< SAMPLE >::readReady   [inline, virtual]
 

Is the connection ready to read w/o blocking.

Reimplemented in ConfigConnection.

Definition at line 101 of file Connection.h.

template<class SAMPLE>
virtual void Connection< SAMPLE >::setType string    type [inline, virtual]
 

set the string type

Reimplemented in ConfigConnection.

Definition at line 70 of file Connection.h.

template<class SAMPLE>
virtual bool Connection< SAMPLE >::writable   [inline, virtual]
 

Is the connection writable;.

Reimplemented in InputConnection< SAMPLE >.

Definition at line 40 of file Connection.h.

template<class SAMPLE>
virtual int Connection< SAMPLE >::write const SAMPLE *    data,
int    size
[inline, virtual]
 

write size samples of data to the Connection

Reimplemented in ConfigConnection.

Definition at line 46 of file Connection.h.

Referenced by FilterConnection< char >::process(), and ConfigConnection::write().

template<class SAMPLE>
virtual bool Connection< SAMPLE >::writeReady   [inline, virtual]
 

Is the connection ready to write w/o blocking.

Reimplemented in ConfigConnection.

Definition at line 113 of file Connection.h.

Referenced by FilterConnection< char >::process().


Member Data Documentation

template<class SAMPLE>
string Connection< SAMPLE >::connectionName [protected]
 

Definition at line 118 of file Connection.h.

Referenced by Connection< char >::getName(), and Connection< char >::init().

template<class SAMPLE>
BufferedFile* Connection< SAMPLE >::file [protected]
 

Definition at line 119 of file Connection.h.

Referenced by Connection< char >::disconnect(), Connection< char >::getFileHandle(), Connection< char >::read(), Connection< char >::readReady(), Connection< char >::write(), Connection< char >::writeReady(), and Connection< char >::~Connection().

template<class SAMPLE>
string Connection< SAMPLE >::type [protected]
 

Definition at line 117 of file Connection.h.

Referenced by Connection< char >::getType(), Connection< char >::init(), and Connection< char >::setType().


The documentation for this class was generated from the following file:
Generated on Tue Dec 17 21:14:37 2002 for AUSS_Connector by doxygen1.2.18