Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
usServiceFactory.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef USSERVICEFACTORY_H
14 #define USSERVICEFACTORY_H
15 
16 #include <usServiceInterface.h>
17 #include <usServiceRegistration.h>
18 
19 namespace us {
20 
56 {
57 
58 public:
59 
61  virtual ~ServiceFactory() {}
62 
88  virtual InterfaceMap GetService(Module* module, const ServiceRegistrationBase& registration) = 0;
89 
105  virtual void UngetService(Module* module, const ServiceRegistrationBase& registration,
106  const InterfaceMap& service) = 0;
107 };
108 
109 }
110 
111 #endif // USSERVICEFACTORY_H
Represents a CppMicroServices module.
Definition: usModule.h:70
virtual ~ServiceFactory()
Destructor.
virtual InterfaceMap GetService(Module *module, const ServiceRegistrationBase &registration)=0
Creates a new service object.
virtual void UngetService(Module *module, const ServiceRegistrationBase &registration, const InterfaceMap &service)=0
Releases a service object.
std::map< std::string, void * > InterfaceMap
A map containing interfaces ids and their corresponding service object pointers.