Elements
6.2
A C++ base framework for the Euclid Software.
|
Go to the documentation of this file.
31 #ifndef ELEMENTSKERNEL_ELEMENTSKERNEL_SYSTEM_H_
32 #define ELEMENTSKERNEL_ELEMENTSKERNEL_SYSTEM_H_
55 #if defined(__APPLE__)
94 #if defined(__linux__) || defined(__APPLE__)
95 #define TEMPLATE_SPECIALIZATION
100 #ifdef _POSIX_HOST_NAME_MAX
101 #define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
103 #define HOST_NAME_MAX 255
113 using EntryPoint =
unsigned long (*)(
const unsigned long iid,
void** ppvObject);
169 #endif // ELEMENTSKERNEL_ELEMENTSKERNEL_SYSTEM_H_
ELEMENTS_API std::string getEnv(const std::string &var)
get a particular environment variable
const ELEMENTS_API std::string getErrorString(unsigned long error)
Retrieve error code as string for a given error.
defines the macros to be used for explicit export of the symbols
const ELEMENTS_API std::string & machineType()
Machine type.
const std::string LIB_EXTENSION
constant that represent the common extension of the libraries
const ELEMENTS_API std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
ELEMENTS_API unsigned long getLastError()
Get last system known error.
ELEMENTS_API int backTrace(ELEMENTS_UNUSED std::shared_ptr< void * > addresses, ELEMENTS_UNUSED const int depth)
const ELEMENTS_API std::string & osVersion()
OS version.
ELEMENTS_API int unSetEnv(const std::string &name)
Simple wrap around unsetenv for strings.
void *(*)() Creator
Definition of the "generic" DLL entry point function.
#define ELEMENTS_API
Dummy definitions for the backward compatibility mode.
const std::string LIB_PREFIX
constant that represent the common prefix of the libraries
const ELEMENTS_API std::string & hostName()
Host name.
ELEMENTS_API bool isEnvSet(const std::string &var)
Check if an environment variable is set or not.
const ELEMENTS_API std::string getLastErrorString()
Get last system error as string.
const std::string LIB_SUFFIX
constant that represents the standard suffix of the libraries: usually "."+LIB_EXTENSION
ELEMENTS_API unsigned long loadDynamicLib(const std::string &name, ImageHandle *handle)
Load dynamic link library.
const std::string SHLIB_VAR_NAME
name of the shared dynamic library path
const std::string SHLIB_SUFFIX
alias for LIB_SUFFIX
ELEMENTS_API bool getStackLevel(ELEMENTS_UNUSED void *addresses, ELEMENTS_UNUSED void *&addr, ELEMENTS_UNUSED std::string &fnc, ELEMENTS_UNUSED std::string &lib)
ELEMENTS_API unsigned long getProcedureByName(ImageHandle handle, const std::string &name, EntryPoint *pFunction)
Get a specific function defined in the DLL.
void * ImageHandle
Definition of an image handle.
Macro to silence unused variables warnings from the compiler.
ELEMENTS_API unsigned long unloadDynamicLib(ImageHandle handle)
unload dynamic link library
const std::string DEFAULT_INSTALL_PREFIX
constant for the canonical installation prefix (on Linux and MacOSX at least)
ELEMENTS_API int setEnv(const std::string &name, const std::string &value, bool overwrite=true)
set an environment variables.
unsigned long(*)(const unsigned long iid, void **ppvObject) EntryPoint
Definition of the "generic" DLL entry point function.
const ELEMENTS_API std::string & osName()
OS name.
void * ProcessHandle
Definition of the process handle.