VPTissue Reference Manual
OdeintFactory0.h
Go to the documentation of this file.
1 #ifndef ODEINT_FACTORY0_H_INCLUDED
2 #define ODEINT_FACTORY0_H_INCLUDED
3 /*
4  * Copyright 2011-2016 Universiteit Antwerpen
5  *
6  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
7  * the European Commission - subsequent versions of the EUPL (the "Licence");
8  * You may not use this work except in compliance with the Licence.
9  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the Licence is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the Licence for the specific language governing
15  * permissions and limitations under the Licence.
16  */
22 #include "OdeintFactories0Map.h"
23 #include "OdeintTraits.h"
24 
25 #include <list>
26 #include <string>
27 #include <vector>
28 
29 namespace SimPT_Sim {
30 
35 {
36 public:
37  using State = OdeintTraits<>::State;
38  using System = OdeintTraits<State>::System;
39  using Solver = OdeintTraits<State>::Solver;
40 
41 public:
42  Solver Create(const std::string& name)
43  {
44  return m_f0_map.Get(name)();
45  }
46 
50  bool ProvidesSolver(const std::string& name) const
51  {
52  return m_f0_map.IsValid(name);
53  }
54 
55  std::list<std::string> List() const
56  {
57  return m_f0_map.List();
58  }
59 
60 private:
61  OdeintFactories0Map m_f0_map;
62 };
63 
64 } // VLEaf2_Sim
65 
66 #endif // end_of_include_guard
Odeint traits header file.
Interface for OdeintFactories0Map.
Produces factory function for odeint integrator algorithm.
Namespace for the core simulator.
bool IsValid(const std::string &name) const
Check whether function name is present.
Definition: FunctionMap.h:63
std::list< std::string > List() const
List the names.
Definition: FunctionMap.h:80
bool ProvidesSolver(const std::string &name) const
Returns true iff this factory can provide the requested solver.
FunctionType Get(const std::string &name) const
Return function for given name.
Definition: FunctionMap.h:57