39#include "blocxx/BLOCXX_config.h"
76 for (citer_t iter =
m_table.begin(); iter !=
m_table.end(); ++iter)
106 for (
size_t i = 0;
i < selObjs.
size() && selected > 0; ++
i)
113 iter_t iter =
m_table.find(selObj.
s);
#define BLOCXX_DEFINE_EXCEPTION_WITH_ID(NAME)
Define a new exception class named <NAME>Exception that derives from Exception.
#define BLOCXX_THROW(exType, msg)
Throw an exception using FILE and LINE.
#define BLOCXX_THROW_ERRNO_MSG(exType, msg)
Throw an exception using FILE, LINE, errno and strerror(errno)
Array<> wraps std::vector<> in COWReference<> adding ref counting and copy on write capability.
void push_back(const T &x)
Append an element to the end of the Array.
bool removeSelectableObject(const Select_t &obj, SelectableCallbackIFC::EEventType eventType)
return indicates if obj was removed
void addSelectableObject(const Select_t &obj, const SelectableCallbackIFCRef &cb, SelectableCallbackIFC::EEventType eventType)
Add an object to the set.
void go(const Timeout &timeout)
SortedVectorMap< Select_t, Data > m_table
virtual void doSelected(Select_t &selectedObject, EEventType eventType)
SelectEngineStopper(SelectEngine &engine)
container_t::const_iterator const_iterator
container_t::iterator iterator
A timeout can be absolute, which means that it will happen at the specified DateTime.
A TimeoutTimer is used by an algorithm to determine when a timeout has expired.
void start()
Meant to be called by timeout functions which loop.
Timeout asTimeout() const
void resetOnLoop()
Meant to be called by timeout functions which loop, and that want to reset the interval.
const int SELECT_TIMEOUT
The value returned from select when the timeout value has expired.
int selectRW(SelectObjectArray &selarray, UInt32 ms)
const int SELECT_ERROR
The value returned from select when any error occurs other than timeout.
bool waitForRead
Input parameter. Set it to true to indicate that waiting for read availability on s is desired.
bool writeAvailable
Ouput parameter. Will be set to true to indicate that s has become available for writing.
bool waitForWrite
Input parameter. Set it to true to indicate that waiting for write availability on s is desired.
bool readAvailable
Ouput parameter. Will be set to true to indicate that s has become available for reading.