FEDEM Model Database  R8.0
Source code of the FEDEM model database
FmTimeSensor.H
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2023 SAP SE
2 //
3 // SPDX-License-Identifier: Apache-2.0
4 //
5 // This file is part of FEDEM - https://openfedem.org
7 
8 #ifndef FM_TIME_SENSOR_H
9 #define FM_TIME_SENSOR_H
10 
11 #include "vpmDB/FmSensorBase.H"
12 
13 
14 class FmTimeSensor : public FmSensorBase
15 {
17 
18 public:
19  FmTimeSensor();
20 
21  virtual bool connect();
22  virtual bool isTime() const { return true; }
23  virtual bool isListable() const { return false; }
24 
25  virtual const char* getUITypeName() const { return "Time sensor"; }
26  virtual std::string getInfoString() const { return std::string("Time"); }
27 
28  virtual int printSolverData(FILE* fp, FmEngine*, int) const;
29 
30  // Note that no file IO methods are needed for this class since it contains
31  // no data except for the IDs. There should only be one TimeSensor object
32  // in a model and it is always genereted when needed.
33 
34 protected:
35  virtual ~FmTimeSensor();
36 };
37 
38 #endif
Definition: FmEngine.H:28
Definition: FmSensorBase.H:18
Definition: FmTimeSensor.H:15
virtual std::string getInfoString() const
Returns a composed string describing this object.
Definition: FmTimeSensor.H:26
virtual ~FmTimeSensor()
Definition: FmTimeSensor.C:24
virtual bool isListable() const
Hook for list view filtering.
Definition: FmTimeSensor.H:23
virtual const char * getUITypeName() const
Returns the type name of this object for use in the GUI.
Definition: FmTimeSensor.H:25
virtual bool isTime() const
Definition: FmTimeSensor.H:22
virtual bool connect()
Inserts this object into the model database.
Definition: FmTimeSensor.C:30
virtual int printSolverData(FILE *fp, FmEngine *, int) const
Definition: FmTimeSensor.C:46
FmTimeSensor()
Definition: FmTimeSensor.C:18