World Ocean Simulation System (WOSS) library
uw-woss-time-reference.h
Go to the documentation of this file.
1/* WOSS - World Ocean Simulation System -
2 *
3 * Copyright (C) 2009 2025 Federico Guerra
4 * and regents of the SIGNET lab, University of Padova
5 *
6 * Author: Federico Guerra - WOSS@guerra-tlc.com
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation;
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22
33#ifndef UNDERWATER_WOSS_TIME_REFERENCE_H
34#define UNDERWATER_WOSS_TIME_REFERENCE_H
35
36
37#include <memory>
38#include <time-definitions.h>
39#include <tclcl.h>
40#include <scheduler.h>
41
42
44
45
46 public:
47
48 virtual ~WossTimeReference() override = default;
49
50 virtual double getTimeReference() const { return Scheduler::instance().clock(); }
51
52 virtual std::unique_ptr<woss::TimeReference> clone() const { return std::make_unique<WossTimeReference>(*this); }
53
54};
55
56class WossTimeReferenceTcl : public TclObject, public WossTimeReference { };
57
58#endif // UNDERWATER_WOSS_TIME_REFERENCE_H
Definition uw-woss-time-reference.h:56
Definition uw-woss-time-reference.h:43
virtual std::unique_ptr< woss::TimeReference > clone() const
Definition uw-woss-time-reference.h:52
virtual ~WossTimeReference() override=default
virtual double getTimeReference() const
Definition uw-woss-time-reference.h:50
Class for simulation time reference purposes.
Definition time-definitions.h:54
Definitions and library for woss::Time, woss::SimTime, woss::TimeReference and woss::TimeReferenceTcl...