Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
usSharedLibrary.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  https://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 USSHAREDLIBRARY_H
23 #define USSHAREDLIBRARY_H
24 
25 #include "usCoreConfig.h"
26 #include "usSharedData.h"
27 
28 #include <string>
29 
31 
32 class SharedLibraryPrivate;
33 
40 {
41 public:
42 
43  SharedLibrary();
44  SharedLibrary(const SharedLibrary& other);
45 
54  SharedLibrary(const std::string& libPath, const std::string& name);
55 
63  SharedLibrary(const std::string& absoluteFilePath);
64 
68  ~SharedLibrary();
69 
70  SharedLibrary& operator=(const SharedLibrary& other);
71 
82  void Load();
83 
91  void Load(int flags);
92 
99  void Unload();
100 
109  void SetName(const std::string& name);
110 
115  std::string GetName() const;
116 
124  std::string GetFilePath(const std::string& name) const;
125 
134  void SetFilePath(const std::string& absoluteFilePath);
135 
141  std::string GetFilePath() const;
142 
150  void SetLibraryPath(const std::string& path);
151 
157  std::string GetLibraryPath() const;
158 
166  void SetSuffix(const std::string& suffix);
167 
173  std::string GetSuffix() const;
174 
182  void SetPrefix(const std::string& prefix);
183 
189  std::string GetPrefix() const;
190 
197  void* GetHandle() const;
198 
204  bool IsLoaded() const;
205 
206 private:
207 
209 
210 };
211 
213 
214 #endif // USTESTUTILSHAREDLIBRARY_H
us::ExplicitlySharedDataPointer< SharedLibraryPrivate >
usCoreConfig.h
US_BEGIN_NAMESPACE
#define US_BEGIN_NAMESPACE
Definition: usGlobalConfig.h:76
US_END_NAMESPACE
#define US_END_NAMESPACE
Definition: usGlobalConfig.h:77
US_Core_EXPORT
#define US_Core_EXPORT
Definition: usCoreExport.h:21
usSharedData.h
us::SharedLibrary
Definition: usSharedLibrary.h:39