OpenCOVER
coShutDownHandler.h
Go to the documentation of this file.
1/* This file is part of COVISE.
2
3 You can use it under the terms of the GNU Lesser General Public License
4 version 2.1 or later, see lgpl-2.1.txt.
5
6 * License: LGPL 2+ */
7
8#ifndef __coShutDownHandler_h
9#define __coShutDownHandler_h
10
11//--------------------------------------------------------------------
12// PROJECT coShutDownHandler © 2009 HLRS
13// $Workfile$
14// $Revision$
15// DESCRIPTION BLA BLA BLA BLA BLA BLA
16//
17// CREATED 20-July-09, S. Franz, U. Woessner
18// MODIFIED 21-July-09, S. Franz
19// Application of HLRS style guide
20//--------------------------------------------------------------------
21// $Log$
22//--------------------------------------------------------------------
23// TAB WIDTH 3
24//--------------------------------------------------------------------
25
26#include <list>
27#include <iostream>
28namespace opencover
29{
30//--------------------------------------------------------------------
31// This class serves as an IFace for all HMIDevice classes for easy and
32// controllable shut downs / destruction of singleton classes like
33// KLSM, KI, Seat, ...
35{
36public:
39 {
40 //std::cerr << "coShutDownHandlerList::coShutDownHandlerList" << std::endl;
41 }
42
43 virtual void shutDown() = 0;
44};
45//--------------------------------------------------------------------
46
47//--------------------------------------------------------------------
48// This class has at its disposal a list of all classes implementing
49// coShutDownHandler and having theirself added to the list. OPENCover
50// calls shutAllDown() in its destructor to destroy all coShutDownHandler
51// singletons and deletes the instance of coShutDownHandlerList
52// (singleton as well) subsequently.
54{
55public:
57
60
61 static coShutDownHandlerList *instance(); // singleton
62
63protected:
65
67
68private:
69 std::list<coShutDownHandler *> *p_handlerList; // contains NO copies!
70};
71//--------------------------------------------------------------------
72}
73#endif
Definition: ARToolKit.h:33
Definition: coShutDownHandler.h:35
coShutDownHandler()
Definition: coShutDownHandler.h:37
virtual ~coShutDownHandler()
Definition: coShutDownHandler.h:38
Definition: coShutDownHandler.h:54
void addHandler(coShutDownHandler *handler)
static coShutDownHandlerList * p_sdhl
Definition: coShutDownHandler.h:66
static coShutDownHandlerList * instance()