BioInt  1.02.00
BioInt: An integrative biological object-oriented application framework and interpreter
BioBasicSocketBuffer< _CharT, _Traits > Class Template Reference

#include <BioSocketBuffer.h>

Collaboration diagram for BioBasicSocketBuffer< _CharT, _Traits >:

List of all members.

Public Types

typedef _CharT char_type
typedef _Traits traits_type
typedef traits_type::int_type int_type
typedef traits_type::pos_type pos_type
typedef traits_type::off_type off_type
typedef std::basic_streambuf
< char_type, traits_type
__streambuf_type

Public Member Functions

 BioBasicSocketBuffer ()
 Default constructor.
 BioBasicSocketBuffer (BioSocket sock_)
 BioBasicSocketBuffer (const BioSocketAddressIn &_sin)
 Convenience constructor, that establishes a connection to a remote host.
virtual ~BioBasicSocketBuffer ()
 Destructor that calls sync(), close() and deletes the buffer.
BioSocket socket () const throw ()
 Get the socket.
void socket (BioSocket sock_) throw ()
 Set the socket.
bool connect (const BioSocketAddressIn &_sin) throw ()
bool connect (const std::string &_addr, uint16_t _port) throw ()
BioBasicSocketBufferclose () throw ()
bool can_read (uint32_t usec_=0, uint32_t sec_=0) throw (std::ios_base::failure)
bool can_write (uint32_t _usec=0, uint32_t _sec=0) throw (std::ios_base::failure)
bool is_connected () const throw ()

Protected Member Functions

void _M_buffer_init (int _sz=1024)
void _M_buffer_delete ()
virtual int_type underflow ()
 Called when the input buffer is empty.
virtual int showmanyc ()
 Called to test how many bytes can be read in the next operation.
virtual int_type overflow (int_type __c=traits_type::eof())
 Called when the output buffer is full.
virtual int sync ()
 Send everything that is on the output buffer.
virtual __streambuf_typesetbuf (char_type *, std::streamsize _n)

Protected Attributes

BioSocket _M_socket
 The socket.
char * _M_ibuffer
 The input and output buffers.
char * _M_obuffer
int _M_buf_size
 The size of input and output buffers.

template<typename _CharT, typename _Traits = std::char_traits<_CharT>>
class BioBasicSocketBuffer< _CharT, _Traits >


Member Typedef Documentation

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
typedef std::basic_streambuf<char_type, traits_type> BioBasicSocketBuffer< _CharT, _Traits >::__streambuf_type
template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
typedef _CharT BioBasicSocketBuffer< _CharT, _Traits >::char_type
template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
typedef traits_type::int_type BioBasicSocketBuffer< _CharT, _Traits >::int_type
template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
typedef traits_type::off_type BioBasicSocketBuffer< _CharT, _Traits >::off_type
template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
typedef traits_type::pos_type BioBasicSocketBuffer< _CharT, _Traits >::pos_type
template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
typedef _Traits BioBasicSocketBuffer< _CharT, _Traits >::traits_type

Constructor & Destructor Documentation

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
BioBasicSocketBuffer< _CharT, _Traits >::BioBasicSocketBuffer ( ) [inline]

Default constructor.

Here is the call graph for this function:

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
BioBasicSocketBuffer< _CharT, _Traits >::BioBasicSocketBuffer ( BioSocket  sock_) [inline, explicit]

Here is the call graph for this function:

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
BioBasicSocketBuffer< _CharT, _Traits >::BioBasicSocketBuffer ( const BioSocketAddressIn _sin) [inline, explicit]

Convenience constructor, that establishes a connection to a remote host.

Here is the call graph for this function:

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
virtual BioBasicSocketBuffer< _CharT, _Traits >::~BioBasicSocketBuffer ( ) [inline, virtual]

Destructor that calls sync(), close() and deletes the buffer.

Here is the call graph for this function:


Member Function Documentation

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
void BioBasicSocketBuffer< _CharT, _Traits >::_M_buffer_delete ( ) [inline, protected]

Here is the caller graph for this function:

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
void BioBasicSocketBuffer< _CharT, _Traits >::_M_buffer_init ( int  _sz = 1024) [inline, protected]

Here is the caller graph for this function:

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
bool BioBasicSocketBuffer< _CharT, _Traits >::can_read ( uint32_t  usec_ = 0,
uint32_t  sec_ = 0 
) throw (std::ios_base::failure) [inline]

Here is the call graph for this function:

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
bool BioBasicSocketBuffer< _CharT, _Traits >::can_write ( uint32_t  _usec = 0,
uint32_t  _sec = 0 
) throw (std::ios_base::failure) [inline]

Here is the call graph for this function:

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
BioBasicSocketBuffer* BioBasicSocketBuffer< _CharT, _Traits >::close ( ) throw () [inline]

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
bool BioBasicSocketBuffer< _CharT, _Traits >::connect ( const BioSocketAddressIn _sin) throw () [inline]

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
bool BioBasicSocketBuffer< _CharT, _Traits >::connect ( const std::string &  _addr,
uint16_t  _port 
) throw () [inline]

Here is the call graph for this function:

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
bool BioBasicSocketBuffer< _CharT, _Traits >::is_connected ( ) const throw () [inline]

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
virtual int_type BioBasicSocketBuffer< _CharT, _Traits >::overflow ( int_type  __c = traits_type::eof()) [inline, protected, virtual]

Called when the output buffer is full.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
virtual __streambuf_type* BioBasicSocketBuffer< _CharT, _Traits >::setbuf ( char_type ,
std::streamsize  _n 
) [inline, protected, virtual]

Here is the call graph for this function:

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
virtual int BioBasicSocketBuffer< _CharT, _Traits >::showmanyc ( ) [inline, protected, virtual]

Called to test how many bytes can be read in the next operation.

Here is the call graph for this function:

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
BioSocket BioBasicSocketBuffer< _CharT, _Traits >::socket ( ) const throw () [inline]

Get the socket.

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
void BioBasicSocketBuffer< _CharT, _Traits >::socket ( BioSocket  sock_) throw () [inline]

Set the socket.

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
virtual int BioBasicSocketBuffer< _CharT, _Traits >::sync ( ) [inline, protected, virtual]

Send everything that is on the output buffer.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
virtual int_type BioBasicSocketBuffer< _CharT, _Traits >::underflow ( ) [inline, protected, virtual]

Called when the input buffer is empty.

Here is the call graph for this function:


Member Data Documentation

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
int BioBasicSocketBuffer< _CharT, _Traits >::_M_buf_size [protected]

The size of input and output buffers.

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
char* BioBasicSocketBuffer< _CharT, _Traits >::_M_ibuffer [protected]

The input and output buffers.

template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
char * BioBasicSocketBuffer< _CharT, _Traits >::_M_obuffer [protected]
template<typename _CharT , typename _Traits = std::char_traits<_CharT>>
BioSocket BioBasicSocketBuffer< _CharT, _Traits >::_M_socket [protected]

The socket.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines