JEMRIS  2.8.1
open-source MRI simulations
PrototypeFactory.h
Go to the documentation of this file.
1 
5 /*
6  * JEMRIS Copyright (C)
7  * 2006-2015 Tony Stoecker
8  * 2007-2015 Kaveh Vahedipour
9  * 2009-2015 Daniel Pflugfelder
10  *
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25  */
26 
27 #ifndef PROTOTYPEFACTORY_H_
28 #define PROTOTYPEFACTORY_H_
29 
30 #include "Prototype.h"
31 #include <vector>
32 using std::vector;
33 #include <map>
34 using std::map;
35 #include <xercesc/dom/DOMNode.hpp>
36 XERCES_CPP_NAMESPACE_USE
37 #include <cctype>
38 #include <algorithm>
39 using namespace std;
40 
45 
46  public:
47 
52 
56  virtual ~PrototypeFactory () {};
57 
64  Prototype* Clone (DOMNode* node) ;
65 
72  Prototype* Clone (string name) ;
73 
79  inline map<string, Prototype*>* getList () {return &m_Clonables;}
80 
81  protected:
82 
88  Prototype* get (string name);
89 
96  int upper (int c);
97 
98 
99  protected:
100 
101  map<string, Prototype*> m_Clonables;
103 };
104 
105 #endif /*PROTOTYPEFACTORY_H_*/
Base class for prototype factories.
Definition: PrototypeFactory.h:44
Implementation of JEMRIS Prototype.
map< string, Prototype * > * getList()
Get Pointer to list of clonable prototypes.
Definition: PrototypeFactory.h:79
PrototypeFactory()
Default constructor.
Definition: PrototypeFactory.h:51
Prototype super class.
Definition: Prototype.h:71
virtual ~PrototypeFactory()
Default destructor.
Definition: PrototypeFactory.h:56

-- last change 17.06.2016 | Tony Stoecker | Imprint --