Gaudi Framework, version v20r2

Generated: 18 Jul 2008

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 71 of file DsoUtils.h.

Referenced by configGenerator::genConfig(), and inDso().

00072 {
00073   return "";
00074 }

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

Definition at line 78 of file DsoUtils.h.

References dsoName(), std::basic_string< _CharT, _Traits, _Alloc >::empty(), std::basic_string< _CharT, _Traits, _Alloc >::find_last_of(), std::basic_string< _CharT, _Traits, _Alloc >::npos, and std::basic_string< _CharT, _Traits, _Alloc >::substr().

Referenced by configGenerator::genConfig().

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

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

Definition at line 19 of file DsoUtils.h.

Referenced by configGenerator::genConfig().

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


Generated at Fri Jul 18 12:10:14 2008 for Gaudi Framework, version v20r2 by Doxygen version 1.5.1 written by Dimitri van Heesch, © 1997-2004