Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/Geant4/tools/rroot/ifac is written in an unsupported language. File is not indexed.

0001 // Copyright (C) 2010, Guy Barrand. All rights reserved.
0002 // See the file tools.license for terms.
0003 
0004 #ifndef tools_rroot_ifac
0005 #define tools_rroot_ifac
0006 
0007 #include <string>
0008 #include <map>
0009 #include <ostream>
0010 
0011 namespace tools {
0012 namespace rroot {
0013   class iro;
0014 }}
0015 
0016 namespace tools {
0017 namespace rroot {
0018 
0019 class ifac {
0020 public:
0021   typedef std::map<char,void*> args;
0022 public:
0023   virtual ~ifac(){}
0024 public:
0025   virtual std::ostream& out() const = 0;
0026   virtual iro* create(const std::string& a_class,const args&) = 0;
0027 public:
0028   static void* find_args(const args& a_args,char a_key) {
0029     std::map<char,void*>::const_iterator it = a_args.find(a_key);
0030     if(it==a_args.end()) return 0;
0031     return (*it).second;
0032   }
0033   //static char arg_branch() {return 'B';}
0034   static char arg_class() {return 'C';}
0035 
0036   static std::string* arg_class(const args& a_args) {
0037     void* p = ifac::find_args(a_args,ifac::arg_class());
0038     if(!p) return 0;
0039     return (std::string*)p;
0040   }
0041 };
0042 
0043 }}
0044 
0045 #endif