Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
07add0bd
Commit
07add0bd
authored
Mar 10, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Instance: add base class which owns the EventLoop
parent
9a9b6fa3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
Instance.hxx
src/Instance.hxx
+10
-3
No files found.
src/Instance.hxx
View file @
07add0bd
...
@@ -42,9 +42,18 @@ class ClientList;
...
@@ -42,9 +42,18 @@ class ClientList;
struct
Partition
;
struct
Partition
;
class
StateFile
;
class
StateFile
;
/**
* A utility class which, when used as the first base class, ensures
* that the #EventLoop gets initialized before the other base classes.
*/
struct
EventLoopHolder
{
EventLoop
event_loop
;
};
struct
Instance
final
struct
Instance
final
:
EventLoopHolder
#if defined(ENABLE_DATABASE) || defined(ENABLE_NEIGHBOR_PLUGINS)
#if defined(ENABLE_DATABASE) || defined(ENABLE_NEIGHBOR_PLUGINS)
:
,
#endif
#endif
#ifdef ENABLE_DATABASE
#ifdef ENABLE_DATABASE
public
DatabaseListener
public
DatabaseListener
...
@@ -56,8 +65,6 @@ struct Instance final
...
@@ -56,8 +65,6 @@ struct Instance final
public
NeighborListener
public
NeighborListener
#endif
#endif
{
{
EventLoop
event_loop
;
GlobalEvents
::
Monitor
global_events
;
GlobalEvents
::
Monitor
global_events
;
#ifdef ENABLE_NEIGHBOR_PLUGINS
#ifdef ENABLE_NEIGHBOR_PLUGINS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment