OpenPolygon  1.0.0
OpenPolygon is a Rendering Engine
overlaymanager.h
1 /*
2  Copyright (C) 2014 - 2016 Mutzii
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 
17 */
18 #ifndef OVERLAYMANAGER_H
19 #define OVERLAYMANAGER_H
20 
21 #include "index.h"
22 #include "element.h"
23 #include "overlay.h"
24 
25 namespace Engine
26 {
27  /* List of Overlays */
28  using Overlays = std::list < Overlay * >;
29 
35  {
36 
37  private:
38 
39  static OverlayManager * ptrInstance;
42  OverlayManager( const OverlayManager &){}
43  void operator =( const OverlayManager &){}
44 
45  public:
46 
52  static OverlayManager * getSingletonPtr(void);
53  void finish(void);
54 
61  Overlay * createOverlay( const std::string & overlay_name );
62 
63 
70  Overlay * getOverlay( const std::string & overlay_name ) throw( std::runtime_error);
71 
72 
78  void removeOverlay( const std::string & overlay_name ) throw( std::runtime_error) ;
79 
85  void removeOverlay( Overlay * overlay );
86 
92  Overlays getOverlays(void);
93 
94  private:
95 
96  Overlays mOverlays;
98  };
99 }
100 
101 #endif // OVERLAYMANAGER_H
The Overlay - container class - list of RenderElements.
Definition: overlay.h:33
Overlay * getOverlay(const std::string &overlay_name)
getOverlay
Definition: OverlayManager.cpp:56
Definition: element.h:23
static OverlayManager * getSingletonPtr(void)
getSingletonPtr
Definition: OverlayManager.cpp:25
Overlays getOverlays(void)
getOverlays
Definition: OverlayManager.cpp:80
void removeOverlay(const std::string &overlay_name)
removeOverlay
Overlay * createOverlay(const std::string &overlay_name)
createOverlay
Definition: OverlayManager.cpp:49
The OverlayManager class.
Definition: overlaymanager.h:34