#include <cxxtools/selectable.h>

Inheritance diagram for cxxtools::Selectable:
cxxtools::NonCopyable cxxtools::IODevice cxxtools::net::TcpServer cxxtools::FileDevice cxxtools::net::TcpSocket tnt::GnuTlsServer tnt::OpensslServer tnt::GnuTlsStream tnt::OpensslStream tnt::GnuTls_iostream tnt::openssl_iostream

Public Types

enum  State { Disabled = 0, Idle = 1, Busy = 2, Avail = 3 }

Public Member Functions

virtual ~Selectable ()
 Destructor.
void setSelector (SelectorBase *parent)
SelectorBaseselector ()
const SelectorBaseselector () const
void close ()
 Closes the I/O device.
bool wait (std::size_t msecs=WaitInfinite)
bool enabled () const
 Test if the I/O device object is enabled.
bool idle () const
bool busy () const
bool avail () const
virtual SelectableImpl & simpl ()=0

Static Public Attributes

static const std::size_t WaitInfinite = Selector::WaitInfinite

Protected Member Functions

 Selectable ()
 Default Constructor.
void setEnabled (bool isEnabled)
 Sets or unsets the device enabled.
void setState (State state)
virtual void onClose ()=0
 Closes the Selector.
virtual bool onWait (std::size_t msecs)=0
virtual void onAttach (SelectorBase &)=0
virtual void onDetach (SelectorBase &)=0
- Protected Member Functions inherited from cxxtools::NonCopyable
 NonCopyable ()

Member Enumeration Documentation

Enumerator:
Disabled 
Idle 
Busy 
Avail 

Constructor & Destructor Documentation

virtual cxxtools::Selectable::~Selectable ( )
virtual

Destructor.

cxxtools::Selectable::Selectable ( )
protected

Default Constructor.

Member Function Documentation

bool cxxtools::Selectable::avail ( ) const
bool cxxtools::Selectable::busy ( ) const
void cxxtools::Selectable::close ( )

Closes the I/O device.

Frees any resources associated with this object, like I/O handles.

bool cxxtools::Selectable::enabled ( ) const

Test if the I/O device object is enabled.

Test if the I/O device object is enabled i.e. open and ready to perform I/O operations

Returns
true if the I/O device is usable, false otherwise.
bool cxxtools::Selectable::idle ( ) const
virtual void cxxtools::Selectable::onAttach ( SelectorBase )
protectedpure virtual
virtual void cxxtools::Selectable::onClose ( )
protectedpure virtual
virtual void cxxtools::Selectable::onDetach ( SelectorBase )
protectedpure virtual
virtual bool cxxtools::Selectable::onWait ( std::size_t  msecs)
protectedpure virtual
SelectorBase* cxxtools::Selectable::selector ( )
const SelectorBase* cxxtools::Selectable::selector ( ) const
void cxxtools::Selectable::setEnabled ( bool  isEnabled)
protected

Sets or unsets the device enabled.

void cxxtools::Selectable::setSelector ( SelectorBase parent)
void cxxtools::Selectable::setState ( State  state)
protected
virtual SelectableImpl& cxxtools::Selectable::simpl ( )
pure virtual
bool cxxtools::Selectable::wait ( std::size_t  msecs = WaitInfinite)

Member Data Documentation

const std::size_t cxxtools::Selectable::WaitInfinite = Selector::WaitInfinite
static

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