xoreos
0.0.5
src
events
requesttypes.h
Go to the documentation of this file.
1
/* xoreos - A reimplementation of BioWare's Aurora engine
2
*
3
* xoreos is the legal property of its developers, whose names
4
* can be found in the AUTHORS file distributed with this source
5
* distribution.
6
*
7
* xoreos is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 3
10
* of the License, or (at your option) any later version.
11
*
12
* xoreos is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with xoreos. If not, see <http://www.gnu.org/licenses/>.
19
*/
20
25
#ifndef EVENTS_REQUESTTYPES_H
26
#define EVENTS_REQUESTTYPES_H
27
28
#include "
src/common/types.h
"
29
#include "
src/common/mutex.h
"
30
31
#include "
src/events/types.h
"
32
33
#include "
src/graphics/types.h
"
34
35
namespace
Graphics
{
36
class
GLContainer;
37
}
38
39
namespace
Events
{
40
41
// Data structures for specific requests
42
43
struct
RequestCallInMainThread
{
44
const
MainThreadCallerFunctor
*
caller
;
45
};
46
47
struct
RequestDataGLContainer
{
48
Graphics::GLContainer
*
glContainer
;
49
};
50
52
class
Request
{
53
public
:
54
Request
(
ITCEvent
type);
55
~Request
();
56
57
bool
isGarbage
()
const
;
58
59
private
:
60
ITCEvent
_type
;
61
62
bool
_dispatched
;
63
bool
_garbage
;
64
65
Common::Semaphore
_hasReply
;
66
67
Event
_event
;
68
70
union
{
71
RequestCallInMainThread
_callInMainThread
;
72
RequestDataGLContainer
_glContainer
;
73
};
74
76
void
create
();
77
79
void
copyToReply
();
80
82
void
signalReply
();
83
84
void
setGarbage
();
85
86
friend
class
EventsManager
;
87
friend
class
RequestManager
;
88
};
89
90
}
// End of namespace Events
91
92
#endif // EVENTS_REQUESTTYPES_H
Events::Request::create
void create()
Create the empty request frame.
Definition:
requesttypes.cpp:51
Events::Request::signalReply
void signalReply()
Signal that the request was answered.
Definition:
requesttypes.cpp:57
types.h
Basic event types.
Events::Request::_event
Event _event
The actual event.
Definition:
requesttypes.h:67
Events::RequestDataGLContainer
Definition:
requesttypes.h:47
Events::RequestManager
The request manager, handling all requests.
Definition:
requests.h:65
Events::Request::setGarbage
void setGarbage()
Definition:
requesttypes.cpp:47
Common::Semaphore
A semaphore .
Definition:
mutex.h:55
Events::Request::_glContainer
RequestDataGLContainer _glContainer
Definition:
requesttypes.h:72
Events::RequestDataGLContainer::glContainer
Graphics::GLContainer * glContainer
Definition:
requesttypes.h:48
Events::Request::~Request
~Request()
Definition:
requesttypes.cpp:39
types.h
Basic graphics types.
Events::Request::_type
ITCEvent _type
Definition:
requesttypes.h:60
Events
Definition:
events.cpp:50
Events::Event
SDL_Event Event
Definition:
types.h:42
Events::RequestCallInMainThread::caller
const MainThreadCallerFunctor * caller
Definition:
requesttypes.h:44
Events::Request::isGarbage
bool isGarbage() const
Definition:
requesttypes.cpp:42
Events::RequestCallInMainThread
Definition:
requesttypes.h:43
Events::Request::copyToReply
void copyToReply()
Copy reply data to the reply address.
Definition:
requesttypes.cpp:61
Events::ITCEvent
ITCEvent
Specific type of the inter-thread communication.
Definition:
types.h:70
types.h
Low-level type definitions to handle fixed width types portably.
Events::EventsManager
The events manager.
Definition:
events.h:48
Events::Request::_garbage
bool _garbage
Definition:
requesttypes.h:63
Events::MainThreadCallerFunctor
boost::function< void()> MainThreadCallerFunctor
Definition:
types.h:346
mutex.h
Thread mutex classes.
Events::Request::Request
Request(ITCEvent type)
Definition:
requesttypes.cpp:33
Events::Request::_hasReply
Common::Semaphore _hasReply
Do we have a reply?
Definition:
requesttypes.h:65
Events::Request
A request, carrying inter-thread communication.
Definition:
requesttypes.h:52
Graphics::GLContainer
A container of OpenGL elements.
Definition:
glcontainer.h:35
Graphics
Definition:
loadprogress.h:33
Events::Request::_callInMainThread
RequestCallInMainThread _callInMainThread
Definition:
requesttypes.h:71
Events::Request::_dispatched
bool _dispatched
Was the request dispatched?
Definition:
requesttypes.h:62
Generated on Sun Nov 18 2018 15:13:41 for xoreos by
1.8.14