cio::channel< T > Class Template Reference
[Channel (C++)]

template<typename T>
class cio::channel< T >

Data Structures

class  iterator

Public Member Functions

 channel () throw (std::bad_alloc)
 channel (struct cio_channel *c_ptr) throw ()
 channel (channel &other) throw ()
 ~channel () throw ()
channeloperator= (channel &other) throw ()
void close () throw ()
bool read (T &item)
bool write (const T &item)
struct cio_channelc_ptr () throw ()

Constructor & Destructor Documentation

template<typename T >
cio::channel< T >::channel (  )  throw (std::bad_alloc)

Create a new channel.

template<typename T >
cio::channel< T >::channel ( struct cio_channel< T > *  c_ptr  )  throw () [explicit]

Steal a reference to a C channel object.

Precondition:
Item size of c_ptr must match T
template<typename T >
cio::channel< T >::channel ( channel< T > &  other  )  throw ()

Reference an existing channel.

template<typename T >
cio::channel< T >::~channel (  )  throw ()

Unreference the channel.


Member Function Documentation

template<typename T >
struct cio_channel* cio::channel< T >::c_ptr (  )  throw () [read]
Returns:
a shared reference to the C channel object
template<typename T >
void cio::channel< T >::close (  )  throw ()
template<typename T >
channel& cio::channel< T >::operator= ( channel< T > &  other  )  throw ()

Drop the existing reference and reference another channel.

template<typename T >
bool cio::channel< T >::read ( T &  item  ) 
See also:
cio_read
template<typename T >
bool cio::channel< T >::write ( const T &  item  ) 
See also:
cio_write