PaCO++  0.05
paco_com.cc
Go to the documentation of this file.
1 #if 0
2 #include "paco_com.h"
3 
6 // Implementation of paco_com
7 
8 paco_com::paco_com() {}
10 
13 // Implementation of paco_fabrique_com
14 
15 paco_fabrique_com::paco_fabrique_com() {
16  // Be sure class_map is empty ;)
17  _class_map.clear();
18 }
19 
21 
22 void paco_fabrique_com::paco_register(const string& lib_com, paco_individual_fabrique_com* pifc) {
23 
24  class_map_t::iterator it = _class_map.find(lib_com);
25 
26  if (it == _class_map.end() ) {
27  cout << "Adding com lib " << lib_com << endl;
28  _class_map[lib_com] = pifc;
29  } else {
30  cout << "Ignoring: already register com lib " << lib_com << endl;
31  }
32 
33 }
34 
35 paco_com* paco_fabrique_com::paco_create(const string& lib_com, void* group)
36 {
37  class_map_t::iterator it = _class_map.find(lib_com);
38 
39  if (it == _class_map.end() ) {
40  cout << "Not found com lib " << lib_com << endl;
41  return NULL;
42  } else {
43  return it->second->paco_create(group);
44  }
45 }
46 
49 #endif
virtual ~paco_fabrique_com()
Definition: paco_com.h:25
virtual paco_com * paco_create(void *group)=0
virtual ~paco_com()
Definition: paco_com.h:14