Gaudi Framework, version v25r0

Home   Generated: Mon Feb 17 2014
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
DsoUtils Namespace Reference

Functions

std::string libNativeName (const std::string &libName)
 
static std::string dsoName (const ROOT::Reflex::Member &)
 
static bool inDso (void *addr, const std::string &dsoname)
 

Function Documentation

static std::string DsoUtils::dsoName ( const ROOT::Reflex::Member &  )
static

Definition at line 69 of file DsoUtils.h.

{
return "";
}
static bool DsoUtils::inDso ( void *  addr,
const std::string dsoname 
)
static

Definition at line 76 of file DsoUtils.h.

{
#ifdef _WIN32
char sep = '\\';
#else
char sep = '/';
#endif
std::string srcname = dsoName(addr);
if (srcname.empty()) {
// we do not know the name of the library, let's guess it's OK
return true;
}
std::string::size_type pos = dsoname.find_last_of(sep);
std::string curname;
if (std::string::npos == pos) {
curname = dsoname;
} else {
curname = dsoname.substr(pos+1);
}
return srcname == curname;
}
std::string DsoUtils::libNativeName ( const std::string libName)
inline

Definition at line 18 of file DsoUtils.h.

{
#if defined(_WIN32)
return libName+".dll";
#elif defined(__linux) || defined(__APPLE__)
return "lib"+libName+".so";
#else
// variant of the GIGO design pattern
return libName;
#endif
}

Generated at Mon Feb 17 2014 14:38:14 for Gaudi Framework, version v25r0 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004