| # Gaudi Framework, version v23r1 |

Home |  | Generated: Wed Feb 29 2012

Functions

# 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.

    {
      return "";
    }

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

Definition at line 86 of file DsoUtils.h.

    {
    #ifdef _WIN32
      char sep = '\\';
    #else
      char sep = '/';
    #endif

      std::string srcname = dsoName(mem);
      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 21 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
    }

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines