Gaudi Framework, version v23r6

Home   Generated: Wed Jan 30 2013
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
FileReadTool.cpp
Go to the documentation of this file.
1 #include "FileReadTool.h"
2 #include <fstream>
3 
6 
7 FileReadTool::FileReadTool( const std::string& type,
8  const std::string& name,
9  const IInterface* parent):
10  base_class(type, name, parent)
11 {
12  //declareInterface<IFileAccess>(this);
13  m_protocols.push_back("file");
14 }
15 
17 
19  // remove the optional "file://" from the beginning of the url
21  if ( url.substr(0,7) == "file://" ) {
22  path = url.substr(7);
23  } else {
24  path = url;
25  }
26  return std::auto_ptr<std::istream>(new std::ifstream(path.c_str()));
27 }
28 
30 {
31  return m_protocols;
32 }

Generated at Wed Jan 30 2013 17:13:41 for Gaudi Framework, version v23r6 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004