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

ConnectionWrap Class Reference

#include <ConnectionWrap.h>

Collaboration diagram for ConnectionWrap:

Collaboration graph
[legend]
List of all members.

Detailed Description

ConnectionWrap is a 5 byte wrapper for a connection.

It is used to wrap the type of the connection as well as functions. This is so we can have a vector of one type containing many.

Definition at line 36 of file ConnectionWrap.h.

Public Methods

 ConnectionWrap ()
 Default Constructor.

 ConnectionWrap (void *connection, int type)
 The constructor, connection is a Connection and type is the type like (SHORTCONN,BYTECONN,..).

int getFileHandle ()
 Returns the current connection's FileHandle.

bool readable ()
 is it readable?

string * getXML ()
 gets the Connection XML connection

void disconnect ()
 Disconnect Connection.

void process ()
 Process the connection (read or write).

 ~ConnectionWrap ()
 Destructor.

void write (char *buffer, int size)
 Write to connection size is the number of samples not the number of bytes.

int read (char *buffer, int size)
 read from connection size is the number of samples not the number of bytes

bool readReady ()
 W/o blocking is the connection readable.

bool writeReady ()
 W/o blocking is the connection writable.

int getDataSize ()
 Get the data size of the current connection.

void disconnectFrom (ConnectionWrap *w)
 Disconnect the connection FROM another connection (incoming patch) (Wrap).

void disconnectTo (ConnectionWrap *w)
 Disconnect the connection TO another connection (outgoing patch) (Wrap).

void connectFrom (ConnectionWrap *w)
 connectFrom Accepts a connection FROM conn connection (incoming connection).


Public Attributes

ConnectionU conn
 The connection union containing the connection being wrapped.

char type
 the type


Constructor & Destructor Documentation

ConnectionWrap::ConnectionWrap   [inline]
 

Default Constructor.

Definition at line 49 of file ConnectionWrap.h.

References type, and ConnectionU::voidStar.

ConnectionWrap::ConnectionWrap void *    connection,
int    type
[inline]
 

The constructor, connection is a Connection and type is the type like (SHORTCONN,BYTECONN,..).

Definition at line 53 of file ConnectionWrap.h.

References type, and ConnectionU::voidStar.

ConnectionWrap::~ConnectionWrap   [inline]
 

Destructor.

Definition at line 135 of file ConnectionWrap.h.

References CHARCONN, ConnectionU::charFConn, ConnectionU::configConn, CONFIGCONN, DOUBLECONN, ConnectionU::doubleFConn, FLOATCONN, ConnectionU::floatFConn, SHORTCONN, ConnectionU::shortFConn, type, and ConnectionU::voidStar.


Member Function Documentation

void ConnectionWrap::connectFrom ConnectionWrap *    w [inline]
 

connectFrom Accepts a connection FROM conn connection (incoming connection).

Definition at line 267 of file ConnectionWrap.h.

References ConnectionU::charConn, CHARCONN, conn, ConnectionU::doubleConn, DOUBLECONN, ConnectionU::floatConn, FLOATCONN, ConnectionU::shortConn, SHORTCONN, and type.

Referenced by main(), and Connector::patch().

void ConnectionWrap::disconnect   [inline]
 

Disconnect Connection.

Definition at line 105 of file ConnectionWrap.h.

References ConnectionU::charConn, CHARCONN, ConnectionU::configConn, CONFIGCONN, Connection< double >::disconnect(), Connection< float >::disconnect(), Connection< char >::disconnect(), Connection< short >::disconnect(), ConnectionU::doubleConn, DOUBLECONN, ConnectionU::floatConn, FLOATCONN, ConnectionU::shortConn, SHORTCONN, and type.

Referenced by Connector::disconnect().

void ConnectionWrap::disconnectFrom ConnectionWrap *    w [inline]
 

Disconnect the connection FROM another connection (incoming patch) (Wrap).

Definition at line 235 of file ConnectionWrap.h.

References ConnectionU::charConn, CHARCONN, conn, ConnectionU::doubleConn, DOUBLECONN, ConnectionU::floatConn, FLOATCONN, ConnectionU::shortConn, SHORTCONN, and type.

Referenced by Connector::unPatch().

void ConnectionWrap::disconnectTo ConnectionWrap *    w [inline]
 

Disconnect the connection TO another connection (outgoing patch) (Wrap).

Definition at line 251 of file ConnectionWrap.h.

References ConnectionU::charConn, CHARCONN, ConnectionU::charFConn, conn, ConnectionU::doubleConn, DOUBLECONN, ConnectionU::doubleFConn, ConnectionU::floatConn, FLOATCONN, ConnectionU::floatFConn, ConnectionU::shortConn, SHORTCONN, ConnectionU::shortFConn, and type.

int ConnectionWrap::getDataSize   [inline]
 

Get the data size of the current connection.

Definition at line 220 of file ConnectionWrap.h.

References ConnectionU::charConn, CHARCONN, CONFIGCONN, ConnectionU::doubleConn, DOUBLECONN, ConnectionU::floatConn, FLOATCONN, Connection< double >::getDataSize(), Connection< float >::getDataSize(), Connection< char >::getDataSize(), Connection< short >::getDataSize(), ConnectionU::shortConn, SHORTCONN, and type.

int ConnectionWrap::getFileHandle   [inline]
 

Returns the current connection's FileHandle.

Definition at line 60 of file ConnectionWrap.h.

References ConnectionU::charConn, CHARCONN, ConnectionU::doubleConn, DOUBLECONN, ConnectionU::floatConn, FLOATCONN, Connection< double >::getFileHandle(), Connection< float >::getFileHandle(), Connection< char >::getFileHandle(), Connection< short >::getFileHandle(), ConnectionU::shortConn, SHORTCONN, and type.

string* ConnectionWrap::getXML   [inline]
 

gets the Connection XML connection

Definition at line 90 of file ConnectionWrap.h.

References CHARCONN, ConnectionU::charFConn, DOUBLECONN, ConnectionU::doubleFConn, FLOATCONN, ConnectionU::floatFConn, FilterConnection< double >::getXML(), FilterConnection< float >::getXML(), FilterConnection< char >::getXML(), FilterConnection< short >::getXML(), SHORTCONN, ConnectionU::shortFConn, and type.

void ConnectionWrap::process   [inline]
 

Process the connection (read or write).

Definition at line 121 of file ConnectionWrap.h.

References CHARCONN, ConnectionU::charFConn, DOUBLECONN, ConnectionU::doubleFConn, FLOATCONN, ConnectionU::floatFConn, FilterConnection< double >::process(), FilterConnection< float >::process(), FilterConnection< char >::process(), FilterConnection< short >::process(), SHORTCONN, ConnectionU::shortFConn, and type.

Referenced by main().

int ConnectionWrap::read char *    buffer,
int    size
[inline]
 

read from connection size is the number of samples not the number of bytes

Definition at line 173 of file ConnectionWrap.h.

References ConnectionU::charConn, CHARCONN, ConnectionU::configConn, CONFIGCONN, ConnectionU::doubleConn, DOUBLECONN, ConnectionU::floatConn, FLOATCONN, ConnectionU::shortConn, SHORTCONN, type, ConfigConnection::write(), Connection< double >::write(), Connection< float >::write(), Connection< char >::write(), and Connection< short >::write().

bool ConnectionWrap::readable   [inline]
 

is it readable?

Definition at line 75 of file ConnectionWrap.h.

References ConnectionU::charConn, CHARCONN, ConnectionU::doubleConn, DOUBLECONN, ConnectionU::floatConn, FLOATCONN, Connection< double >::readable(), Connection< float >::readable(), Connection< char >::readable(), Connection< short >::readable(), ConnectionU::shortConn, SHORTCONN, and type.

Referenced by Connector::patch().

bool ConnectionWrap::readReady   [inline]
 

W/o blocking is the connection readable.

Definition at line 190 of file ConnectionWrap.h.

References ConnectionU::charConn, CHARCONN, CONFIGCONN, ConnectionU::doubleConn, DOUBLECONN, ConnectionU::floatConn, FLOATCONN, Connection< double >::readReady(), Connection< float >::readReady(), Connection< char >::readReady(), Connection< short >::readReady(), ConnectionU::shortConn, SHORTCONN, and type.

void ConnectionWrap::write char *    buffer,
int    size
[inline]
 

Write to connection size is the number of samples not the number of bytes.

Definition at line 156 of file ConnectionWrap.h.

References ConnectionU::charConn, CHARCONN, ConnectionU::configConn, CONFIGCONN, ConnectionU::doubleConn, DOUBLECONN, ConnectionU::floatConn, FLOATCONN, ConnectionU::shortConn, SHORTCONN, type, ConfigConnection::write(), Connection< double >::write(), Connection< float >::write(), Connection< char >::write(), and Connection< short >::write().

Referenced by main().

bool ConnectionWrap::writeReady   [inline]
 

W/o blocking is the connection writable.

Definition at line 205 of file ConnectionWrap.h.

References ConnectionU::charConn, CHARCONN, CONFIGCONN, ConnectionU::doubleConn, DOUBLECONN, ConnectionU::floatConn, FLOATCONN, ConnectionU::shortConn, SHORTCONN, type, Connection< double >::writeReady(), Connection< float >::writeReady(), Connection< char >::writeReady(), and Connection< short >::writeReady().

Referenced by main().


Member Data Documentation

ConnectionU ConnectionWrap::conn
 

The connection union containing the connection being wrapped.

Definition at line 41 of file ConnectionWrap.h.

Referenced by connectFrom(), disconnectFrom(), disconnectTo(), main(), and Connector::process().

char ConnectionWrap::type
 

the type

Definition at line 45 of file ConnectionWrap.h.

Referenced by connectFrom(), ConnectionWrap(), disconnect(), disconnectFrom(), disconnectTo(), getDataSize(), getFileHandle(), getXML(), Connector::process(), process(), read(), readable(), readReady(), write(), writeReady(), and ~ConnectionWrap().


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