Elements  5.8
A C++ base framework for the Euclid Software.
ModuleInfo.h
Go to the documentation of this file.
1 
27 #ifndef ELEMENTSKERNEL_ELEMENTSKERNEL_MODULEINFO_H_
28 #define ELEMENTSKERNEL_ELEMENTSKERNEL_MODULEINFO_H_
29 
30 // STL include files
31 #include <string>
32 #include <vector>
33 #include <memory>
34 #include <dlfcn.h>
35 
36 #include <boost/filesystem/path.hpp> // for filesystem::path
37 
38 // Framework include files
39 #include "ElementsKernel/System.h" // LIB_PREFIX, LIB_EXTENSION
40 #include "ElementsKernel/Export.h" // ELEMENTS_API
41 
42 namespace Elements {
43 namespace System {
44 
46 public:
47  ModuleInfo();
48  explicit ModuleInfo(void *);
49  const std::string name() const;
50  const std::string libraryName() const;
51  const void* addresse() const;
52  operator const Dl_info&() const;
53  bool isEmpty() const;
54 private:
56 };
57 
58 enum class ModuleType {
60 };
61 
83 
84 } // namespace System
85 } // namespace Elements
86 
87 #endif // ELEMENTSKERNEL_ELEMENTSKERNEL_MODULEINFO_H_
88 
System.h
This file is intended to iron out all the differences between systems (currently Linux and MacOSX)
Export.h
defines the macros to be used for explicit export of the symbols
std::string
STL class.
Elements::System::linkedModulePaths
ELEMENTS_API std::vector< boost::filesystem::path > linkedModulePaths()
Definition: ModuleInfo.cpp:210
Elements::System::setModuleHandle
ELEMENTS_API void setModuleHandle(ImageHandle handle)
Attach module handle.
Definition: ModuleInfo.cpp:150
Elements::System::moduleName
const ELEMENTS_API std::string & moduleName()
Get the name of the (executable/DLL) file without file-type.
Definition: ModuleInfo.cpp:96
std::vector< std::string >
Elements::System::ModuleType
ModuleType
Definition: ModuleInfo.h:58
Elements::System::exeHandle
ELEMENTS_API ImageHandle exeHandle()
Handle to the executable file running.
Definition: ModuleInfo.cpp:166
Elements::System::moduleNameFull
const ELEMENTS_API std::string & moduleNameFull()
Get the full name of the (executable/DLL) file.
Definition: ModuleInfo.cpp:108
Elements::System::linkedModules
const ELEMENTS_API std::vector< std::string > linkedModules()
Vector of names of linked modules.
Definition: ModuleInfo.cpp:236
Elements::System::ModuleType::EXECUTABLE
@ EXECUTABLE
ElementsServices::DataSync::path
boost::filesystem::path path
Definition: DataSyncUtils.h:33
Elements::System::getExecutablePath
ELEMENTS_API boost::filesystem::path getExecutablePath()
Get the full executable path.
Definition: ModuleInfo.cpp:248
Elements::System::moduleType
ELEMENTS_API ModuleType moduleType()
Get type of the module.
Definition: ModuleInfo.cpp:125
ELEMENTS_API
#define ELEMENTS_API
Dummy definitions for the backward compatibility mode.
Definition: Export.h:74
Elements::System::ModuleInfo
Definition: ModuleInfo.h:45
Elements::System::processHandle
ELEMENTS_API ProcessHandle processHandle()
Handle to running process.
Definition: ModuleInfo.cpp:144
Elements::System::exeName
const ELEMENTS_API std::string & exeName()
Name of the executable file running.
Definition: ModuleInfo.cpp:186
Elements::System::ModuleInfo::m_dlinfo
std::unique_ptr< Dl_info > m_dlinfo
Definition: ModuleInfo.h:55
Elements::System::moduleHandle
ELEMENTS_API ImageHandle moduleHandle()
Handle to currently executed module.
Definition: ModuleInfo.cpp:154
Elements::System::ModuleType::SHAREDLIB
@ SHAREDLIB
Elements::System::ImageHandle
void * ImageHandle
Definition of an image handle.
Definition: System.h:118
std::unique_ptr< Dl_info >
Elements::System::ProcessHandle
void * ProcessHandle
Definition of the process handle.
Definition: System.h:120
Elements::System::ModuleType::UNKNOWN
@ UNKNOWN
Elements
Definition: Auxiliary.h:43
Elements::System::InfoType::System
@ System