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