OGS
TimeInterval.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2
// SPDX-License-Identifier: BSD-3-Clause
3
4
#pragma once
5
6
namespace
BaseLib
7
{
8
class
ConfigTree
;
9
14
struct
TimeInterval
final
15
{
16
public
:
17
bool
contains
(
const
double
current_time)
const
18
{
19
return
(current_time >=
start_time
&& current_time <=
end_time
);
20
}
21
22
double
start_time
;
23
double
end_time
;
24
};
25
26
TimeInterval
createTimeInterval
(
ConfigTree
const
& config);
27
28
}
// namespace BaseLib
BaseLib::ConfigTree
Definition
ConfigTree.h:101
BaseLib
Definition
TestDefinition.h:13
BaseLib::createTimeInterval
TimeInterval createTimeInterval(ConfigTree const &config)
Definition
TimeInterval.cpp:12
BaseLib::TimeInterval
Definition
TimeInterval.h:15
BaseLib::TimeInterval::end_time
double end_time
Definition
TimeInterval.h:23
BaseLib::TimeInterval::start_time
double start_time
Definition
TimeInterval.h:22
BaseLib::TimeInterval::contains
bool contains(const double current_time) const
Definition
TimeInterval.h:17
BaseLib
TimeInterval.h
Generated by
1.14.0