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 //
12 
13 // system include files
14 
15 // user include files
17 
18 namespace edmplugin {
19  namespace standard {
20 
22  {
23  PluginManager::Config returnValue;
24 
25 #ifdef __APPLE__
26  const char *path = getenv ("DYLD_FALLBACK_LIBRARY_PATH");
27 #else
28  const char *path = getenv ("LD_LIBRARY_PATH");
29 #endif
30  if (! path) path = "";
31 
32  std::string spath(path);
35  std::vector<std::string> paths;
36  while( (i=spath.find_first_of(':',last))!=std::string::npos) {
37  paths.push_back(spath.substr(last,i-last));
38  last = i+1;
39  //std::cout <<paths.back()<<std::endl;
40  }
41  paths.push_back(spath.substr(last,std::string::npos));
42  returnValue.searchPath(paths);
43 
44  return returnValue;
45  }
46 
48  static const boost::filesystem::path s_path(".edmplugincache");
49  return s_path;
50  }
51 
52 
54  static const std::string s_prefix("plugin");
55  return s_prefix;
56  }
57 
58  }
59 }
int i
Definition: DBlmapReader.cc:9
const boost::filesystem::path & cachefileName()
Definition: standard.cc:47
uint16_t size_type
const std::string & pluginPrefix()
Definition: standard.cc:53
PluginManager::Config config()
Definition: standard.cc:21
Config & searchPath(const SearchPath &iPath)
Definition: PluginManager.h:59