| # Gaudi Framework, version v21r10p1 |

Home |  | Generated: 29 Jul 2010

# DsoUtils Namespace Reference

## Functions
std::string | libNativeName (const std::string &libName)
static std::string | dsoName (const ROOT::Reflex::Member &)
static bool | inDso (const ROOT::Reflex::Member &mem, const std::string &dsoname)

## Function Documentation

static std::string DsoUtils::dsoName | ( | const ROOT::Reflex::Member & |  | ) | `[static]`

Definition at line 79 of file DsoUtils.h.

    00080 {
    00081   return "";
    00082 }

static bool DsoUtils::inDso | ( | const ROOT::Reflex::Member & | mem,
|  | const std::string & | dsoname |
| ) |  |  | `[static]`

Definition at line 86 of file DsoUtils.h.

    00088 {
    00089 #ifdef _WIN32
    00090   char sep = '\\';
    00091 #else
    00092   char sep = '/';
    00093 #endif
    00094
    00095   std::string srcname = dsoName(mem);
    00096   if (srcname.empty()) {
    00097     // we do not know the name of the library, let's guess it's OK
    00098     return true;
    00099   }
    00100
    00101   std::string::size_type pos = dsoname.find_last_of(sep);
    00102   std::string curname;
    00103   if (std::string::npos == pos) {
    00104     curname = dsoname;
    00105   } else {
    00106     curname = dsoname.substr(pos+1);
    00107   }
    00108
    00109   return srcname == curname;
    00110 }

std::string DsoUtils::libNativeName | ( | const std::string & | libName | ) | `[inline]`

Definition at line 21 of file DsoUtils.h.

    00022 {
    00023 #if defined(_WIN32)
    00024   return libName+".dll";
    00025 #elif defined(__linux) || defined(__APPLE__)
    00026   return "lib"+libName+".so";
    00027 #else
    00028   // variant of the GIGO design pattern
    00029   return libName;
    00030 #endif
    00031 }