Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
usModuleEvent.h
Go to the documentation of this file.
1 /*============================================================================
2 
3  Library: CppMicroServices
4 
5  Copyright (c) German Cancer Research Center (DKFZ)
6  All rights reserved.
7 
8  Licensed under the Apache License, Version 2.0 (the "License");
9  you may not use this file except in compliance with the License.
10  You may obtain a copy of the License at
11 
12  http://www.apache.org/licenses/LICENSE-2.0
13 
14  Unless required by applicable law or agreed to in writing, software
15  distributed under the License is distributed on an "AS IS" BASIS,
16  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  See the License for the specific language governing permissions and
18  limitations under the License.
19 
20 ============================================================================*/
21 
22 #ifndef USMODULEEVENT_H
23 #define USMODULEEVENT_H
24 
25 #include <iostream>
26 
27 #include "usSharedData.h"
28 
29 US_BEGIN_NAMESPACE
30 
31 class Module;
32 class ModuleEventData;
33 
46 class US_Core_EXPORT ModuleEvent
47 {
48 
50 
51 public:
52 
53  enum Type {
54 
63 
72 
81 
89  UNLOADING
90 
91  };
92 
96  ModuleEvent();
97 
98  ~ModuleEvent();
99 
107  bool IsNull() const;
108 
115  ModuleEvent(Type type, Module* module);
116 
117  ModuleEvent(const ModuleEvent& other);
118 
119  ModuleEvent& operator=(const ModuleEvent& other);
120 
126  Module* GetModule() const;
127 
139  Type GetType() const;
140 
141 };
142 
147 US_Core_EXPORT std::ostream& operator<<(std::ostream& os, ModuleEvent::Type eventType);
148 US_Core_EXPORT std::ostream& operator<<(std::ostream& os, const ModuleEvent& event);
151 US_END_NAMESPACE
152 
153 #endif // USMODULEEVENT_H
US_Core_EXPORT std::ostream & operator<<(std::ostream &os, const ModuleEvent &event)