inlib
1.2.0
|
00001 // Copyright (C) 2010, Guy Barrand. All rights reserved. 00002 // See the file inlib.license for terms. 00003 00004 #ifndef inlib_rroot_ifac 00005 #define inlib_rroot_ifac 00006 00007 #include <string> 00008 #include <map> 00009 00010 namespace inlib { 00011 namespace rroot { 00012 class iro; 00013 }} 00014 00015 namespace inlib { 00016 namespace rroot { 00017 00018 class ifac { 00019 public: 00020 typedef std::map<char,void*> args; 00021 public: 00022 virtual ~ifac(){} 00023 public: 00024 virtual iro* create(const std::string& a_class,const args&) = 0; 00025 public: 00026 static void* find_args(const args& a_args,char a_key) { 00027 std::map<char,void*>::const_iterator it = a_args.find(a_key); 00028 if(it==a_args.end()) return 0; 00029 return (*it).second; 00030 } 00031 static char arg_branch() {return 'B';} 00032 }; 00033 00034 }} 00035 00036 #endif