25 #ifndef EVENTS_REQUESTS_H 26 #define EVENTS_REQUESTS_H 30 #include <boost/bind.hpp> 127 #define RequestMan Events::RequestManager::instance() 129 #endif // EVENTS_REQUESTS_H Class and macro for implementing singletons.
T callInMainThread(const MainThreadFunctor< T > &f)
Call this function in the main thread.
const Common::Exception & getError() const
The request manager, handling all requests.
void dispatchAndWait(RequestID request)
Dispatch a request and wait for the answer.
A list storing pointer to objects, with automatic deletion.
Common::Mutex _mutexUse
The mutex locking the use of the manager.
Generic template base class for implementing the singleton design pattern.
A class that creates its own thread.
RequestID rebuild(Graphics::GLContainer &glContainer)
Request that a GL container shall be rebuilt.
ITCEvent
Specific type of the inter-thread communication.
Low-level type definitions to handle fixed width types portably.
RequestList::iterator RequestID
boost::function< void()> MainThreadCallerFunctor
void dispatch(RequestID request)
Dispatch a request.
RequestList _requests
All currently active requests.
void sync()
Request a sync, letting all prior requests finish.
Common::PtrList< Request > RequestList
RequestID newRequest(ITCEvent type)
Create a new, empty request of that type.
A container of OpenGL elements.
void forget(RequestID request)
Ignore any answer we get.
void dispatchAndForget(RequestID request)
Dispatch a request and ignore the answer.
void waitReply(RequestID request)
Wait for a request to be answered.
Inter-thread request event types.
A functor for a function that needs to be called in the main thread.