Elements  6.0.1
A C++ base framework for the Euclid Software.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 <dlfcn.h>
32 #include <memory>
33 #include <string>
34 #include <vector>
35 
36 // Framework include files
37 #include "ElementsKernel/Export.h" // ELEMENTS_API
38 #include "ElementsKernel/Path.h" // for Path::Item
39 #include "ElementsKernel/System.h" // LIB_PREFIX, LIB_EXTENSION
40 
41 namespace Elements {
42 namespace System {
43 
45 public:
46  ModuleInfo();
47  explicit ModuleInfo(void*);
48  const std::string name() const;
49  const std::string libraryName() const;
50  const void* addresse() const;
51  operator const Dl_info&() const;
52  bool isEmpty() const;
53 
54 private:
56 };
57 
59 
83 
84 } // namespace System
85 } // namespace Elements
86 
87 #endif // ELEMENTSKERNEL_ELEMENTSKERNEL_MODULEINFO_H_
88 
ELEMENTS_API ModuleType moduleType()
Get type of the module.
Definition: ModuleInfo.cpp:123
ELEMENTS_API std::vector< Path::Item > linkedModulePaths()
Definition: ModuleInfo.cpp:206
std::unique_ptr< Dl_info > m_dlinfo
Definition: ModuleInfo.h:55
ELEMENTS_API void setModuleHandle(ImageHandle handle)
Attach module handle.
Definition: ModuleInfo.cpp:148
ELEMENTS_API const std::vector< std::string > linkedModules()
Vector of names of linked modules.
Definition: ModuleInfo.cpp:231
STL class.
defines the macros to be used for explicit export of the symbols
ELEMENTS_API const std::string & moduleNameFull()
Get the full name of the (executable/DLL) file.
Definition: ModuleInfo.cpp:107
void * ImageHandle
Definition of an image handle.
Definition: System.h:109
ELEMENTS_API ProcessHandle processHandle()
Handle to running process.
Definition: ModuleInfo.cpp:142
boost::filesystem::path Item
Definition: Path.h:56
This file is intended to iron out all the differences between systems (currently Linux and MacOSX) ...
#define ELEMENTS_API
Dummy definitions for the backward compatibility mode.
Definition: Export.h:74
ELEMENTS_API const std::string & exeName()
Name of the executable file running.
Definition: ModuleInfo.cpp:183
ELEMENTS_API ImageHandle moduleHandle()
Handle to currently executed module.
Definition: ModuleInfo.cpp:152
ELEMENTS_API const std::string & moduleName()
Get the name of the (executable/DLL) file without file-type.
Definition: ModuleInfo.cpp:95
ELEMENTS_API ImageHandle exeHandle()
Handle to the executable file running.
Definition: ModuleInfo.cpp:164
provide functions to retrieve resources pointed by environment variables
void * ProcessHandle
Definition of the process handle.
Definition: System.h:111
ELEMENTS_API Path::Item getExecutablePath()
Get the full executable path.
Definition: ModuleInfo.cpp:242
ELEMENTS_API Path::Item getSelfProc()
Get the path to the /proc directory of the process.
Definition: ModuleInfo.cpp:191