#include <senf/Utils/Exception.hh>
//#include "IOEvent.mpp"
-///////////////////////////////hh.p////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
namespace senf {
namespace ppi {
type of event is specified using the \a events mask with values from EventFlags.
There are two types of flags:
-
+
\li <em>Event flags</em> (\ref Read, \ref Prio, \ref Write) specify the type of event. The
callback will be called whenever one of the specified events occurs on the filehandle
\li <em>Error flags</em> (\ref Hup, \ref Err) specify some type of error condition on the
: public EventImplementation<IOEventInfo>
{
public:
- ///////////////////////////////////////////////////////////////////////////
+ //-////////////////////////////////////////////////////////////////////////
// Types
// This is stupid, however there is no way to import the Scheduler::EventId enum together
// with the enumeration symbols
- enum EventFlags {
+ enum EventFlags {
Read = scheduler::FdEvent::EV_READ /**< FileHandle is readable */
, Prio = scheduler::FdEvent::EV_PRIO /**< FileHandle priority data is readable */
, Write = scheduler::FdEvent::EV_WRITE /**< FileHandle is writable */
, Err = scheduler::FdEvent::EV_ERR /**< Some other error condition on FileHandle */
};
- ///////////////////////////////////////////////////////////////////////////
+ //-////////////////////////////////////////////////////////////////////////
///\name Structors and default members
- ///@{
+ //\{
IOEvent();
template <class Handle>
IOEvent(Handle handle, unsigned events);
- ///@}
- ///////////////////////////////////////////////////////////////////////////
+ //\}
+ //-////////////////////////////////////////////////////////////////////////
template <class Handle>
void set(Handle handle, unsigned events);
/** \brief Unhandled error condition */
struct ErrorException : public senf::Exception
- { ErrorException() : senf::Exception("senf::ppi::IOEvent::ErrorException"){} };
+ { ErrorException() : senf::Exception("senf::ppi::IOEvent::ErrorException") {} };
/** \brief Unhandled hangup condition */
struct HangupException : public senf::Exception
- { HangupException() : senf::Exception("senf::ppi::IOEvent::HangupException"){} };
+ { HangupException() : senf::Exception("senf::ppi::IOEvent::HangupException") {} };
protected:
private:
virtual void v_enable();
virtual void v_disable();
-
+
void cb(int event);
int fd_;
scheduler::FdEvent event_;
};
-
+
}}
-///////////////////////////////hh.e////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
#include "IOEvent.cci"
#include "IOEvent.ct"
#include "IOEvent.cti"