3 #include <Poco/AutoPtr.h>
4 #include <Poco/Event.h>
5 #include <Poco/Mutex.h>
6 #include <Poco/RefCountedObject.h>
7 #include <Poco/SynchronizedObject.h>
9 #include <Poco/TaskManager.h>
11 #include "core/Result.h"
16 class CommandDispatcher;
30 class Answer :
public Poco::RefCountedObject,
public Poco::SynchronizedObject {
32 typedef Poco::AutoPtr<Answer> Ptr;
45 void setDirty(
bool dirty);
51 bool isPending()
const;
60 unsigned long resultsCount()
const;
62 int handlersCount()
const;
63 void setHandlersCount(
unsigned long counter);
65 void addResult(
Result *result);
83 Result::Ptr at(
size_t position);
85 std::vector<Result::Ptr>::iterator begin();
86 std::vector<Result::Ptr>::iterator end();
90 Poco::Event m_notifyEvent;
91 Poco::AtomicCounter m_dirty;
92 std::vector<Result::Ptr> m_resultList;
93 unsigned long m_handlers;
94 const bool m_autoDispose;
Definition: AnswerQueue.h:22
void waitNotPending(const Poco::Timespan &timeout)
Definition: Answer.cpp:124