StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StStreamFileFactory.h
1 #ifndef STAR_StStreamFileFactory
2 #define STAR_StStreamFileFactory
3 
4 #include <iostream>
5 
6 using namespace std;
7 
8 class StStreamFile;
9 
11  static StStreamFileFactory *fgStreamFactory;
12 protected:
14 public:
15  virtual ~StStreamFileFactory();
16  virtual StStreamFile *Create() = 0;
17  virtual StStreamFile *Create(const char *fileName, ios_base::openmode mode = ios_base::in) = 0;
18  static StStreamFile *StreamFile();
19  static StStreamFile *StreamFile(const char *fileName, ios_base::openmode mode = ios_base::in);
20  static StStreamFileFactory *Factory() { return fgStreamFactory; }
21  static void SetFactory(StStreamFileFactory *factory) { fgStreamFactory=factory; }
22 };
23 
24 #endif