NeoFOAM
WIP Prototype of a modern OpenFOAM core
Loading...
Searching...
No Matches
include
NeoFOAM
core
input.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
// SPDX-FileCopyrightText: 2023 NeoFOAM authors
3
#pragma once
4
5
#include <variant>
6
7
#include "
NeoFOAM/core/dictionary.hpp
"
8
#include "
NeoFOAM/core/tokenList.hpp
"
9
10
namespace
NeoFOAM
11
{
12
13
using
Input
= std::variant<Dictionary, TokenList>;
14
15
template
<
class
DataClass>
16
DataClass
read
(
Input
input)
17
{
18
return
std::visit([](
const
auto
& i) {
return
DataClass::read(i); }, input);
19
}
20
21
}
dictionary.hpp
NeoFOAM
Definition
collection.hpp:14
NeoFOAM::read
DataClass read(Input input)
Definition
input.hpp:16
NeoFOAM::Input
std::variant< Dictionary, TokenList > Input
Definition
input.hpp:13
tokenList.hpp
Generated by
1.9.8