Elements  5.10
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 
85 
86 
87 } // namespace System
88 } // namespace Elements
89 
90 #endif // ELEMENTSKERNEL_ELEMENTSKERNEL_MODULEINFO_H_
91 
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
ELEMENTS_API const 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
ELEMENTS_API const std::string & moduleNameFull()
Get the full name of the (executable/DLL) file.
Definition: ModuleInfo.cpp:108
Elements::System::linkedModules
ELEMENTS_API const 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:38
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
ELEMENTS_API const 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::getSelfProc
ELEMENTS_API boost::filesystem::path getSelfProc()
Get the path to the /proc directory of the process.
Definition: ModuleInfo.cpp:194
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: ClassExample.h:38
Elements::System::InfoType::System
@ System