CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
standard.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: PluginManager
4 // Class : standard
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author: Chris Jones
10 // Created: Sat Apr 7 17:10:11 EDT 2007
11 // $Id: standard.cc,v 1.4 2010/10/05 16:35:12 eulisse Exp $
12 //
13 
14 // system include files
15 
16 // user include files
18 
19 namespace edmplugin {
20  namespace standard {
21 
23  {
24  PluginManager::Config returnValue;
25 
26 #ifdef __APPLE__
27  const char *path = getenv ("DYLD_FALLBACK_LIBRARY_PATH");
28 #else
29  const char *path = getenv ("LD_LIBRARY_PATH");
30 #endif
31  if (! path) path = "";
32 
33  std::string spath(path);
36  std::vector<std::string> paths;
37  while( (i=spath.find_first_of(':',last))!=std::string::npos) {
38  paths.push_back(spath.substr(last,i-last));
39  last = i+1;
40  //std::cout <<paths.back()<<std::endl;
41  }
42  paths.push_back(spath.substr(last,std::string::npos));
43  returnValue.searchPath(paths);
44 
45  return returnValue;
46  }
47 
49  static const boost::filesystem::path s_path(".edmplugincache");
50  return s_path;
51  }
52 
53 
54  const std::string& pluginPrefix() {
55  static const std::string s_prefix("plugin");
56  return s_prefix;
57  }
58 
59  }
60 }
int i
Definition: DBlmapReader.cc:9
const boost::filesystem::path & cachefileName()
Definition: standard.cc:48
uint16_t size_type
const std::string & pluginPrefix()
Definition: standard.cc:54
int path() const
Definition: HLTadd.h:3
PluginManager::Config config()
Definition: standard.cc:22
Config & searchPath(const SearchPath &iPath)
Definition: PluginManager.h:48