Dune::Copasi
Loading...
Searching...
No Matches
parameterized_object.hh
Go to the documentation of this file.
1#ifndef DUNE_COPASI_COMMON_PARAMETERIZED_OBJECT_HH
2#define DUNE_COPASI_COMMON_PARAMETERIZED_OBJECT_HH
3
4#include <dune/common/parameterizedobject.hh>
5
6#include <set>
7#include <string>
8
9namespace Dune::Copasi {
10
12template<typename Signature,
13 typename Key = std::string>
14class ParameterizedObjectFactoryWrapper : public Dune::ParameterizedObjectFactory<Signature, Key> {
15 using Super = Dune::ParameterizedObjectFactory<Signature, Key>;
16public:
17
18 using Super::Super;
19
20 template<class T>
21 void define(Key const& key, T&& t)
22 {
23 Super::define(key, std::forward<T>(t));
24 _keys.insert(key);
25 }
26
27 const std::set<Key>& keys() const {
28 return _keys;
29 }
30
31private:
32 std::set<Key> _keys;
33};
34
35} // namespace Dune::Copasi
36
37#endif // DUNE_COPASI_COMMON_PARAMETERIZED_OBJECT_HH
simple wrapper that captures and exposes the keys of Dune::ParameterizedObjectFactory
Definition parameterized_object.hh:14
void define(Key const &key, T &&t)
Definition parameterized_object.hh:21
const std::set< Key > & keys() const
Definition parameterized_object.hh:27
Definition axis_names.hh:7
constexpr bool is_bitflags_v
Alias for Bitflag indicator.
Definition bit_flags.hh:24