ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
ek/Container.hpp
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2026 The ESPResSo project
3
*
4
* This file is part of ESPResSo.
5
*
6
* ESPResSo is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* ESPResSo is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#pragma once
21
22
#include <
config/config.hpp
>
23
24
#include <
script_interface/ScriptInterface.hpp
>
25
#include <
script_interface/auto_parameters/AutoParameter.hpp
>
26
#include <
script_interface/system/Leaf.hpp
>
27
28
#include <memory>
29
#include <optional>
30
#include <string>
31
32
namespace
ScriptInterface::EK
{
33
34
class
Container
:
public
AutoParameters
<Container, System::Leaf> {
35
public
:
36
Container
() {
37
add_parameters
({
38
{
"solver"
,
39
[](
Variant
const
&v) {
40
if
(not
is_none
(v)) {
41
throw
WriteError(
"solver"
);
42
}
43
},
44
[]() {
return
Variant
{
None
{}}; }},
45
});
46
}
47
};
48
49
}
// namespace ScriptInterface::EK
AutoParameter.hpp
ScriptInterface.hpp
ScriptInterface::AutoParameters< Container, System::Leaf >::add_parameters
void add_parameters(std::vector< AutoParameter > &¶ms)
Definition
AutoParameters.hpp:123
ScriptInterface::AutoParameters< Container, System::Leaf >::AutoParameters
AutoParameters()=default
ScriptInterface::EK::Container::Container
Container()
Definition
ek/Container.hpp:36
ScriptInterface::None
Type to indicate no value in Variant.
Definition
None.hpp:31
config.hpp
ScriptInterface::EK
Definition
ek/Container.hpp:32
ScriptInterface::is_none
constexpr bool is_none(Variant const &v)
Definition
Variant.hpp:163
ScriptInterface::Variant
make_recursive_variant< ObjectRef > Variant
Possible types for parameters.
Definition
Variant.hpp:131
Leaf.hpp
src
script_interface
ek
Container.hpp
Generated on
for ESPResSo by
1.15.0