SimulationTime< FP > Class Template Reference
|
CPP API
|
mio::SimulationTime< FP > Class Template Reference
Typesafe wrapper for a floating-point simulation time value (in days). More...
#include <damping.h>
Inheritance diagram for mio::SimulationTime< FP >:
Collaboration diagram for mio::SimulationTime< FP >:
Additional Inherited Members | |
Public Types inherited from mio::TypeSafe< FP, SimulationTime< FP > > | |
| using | ValueType = FP |
Public Member Functions inherited from mio::TypeSafe< FP, SimulationTime< FP > > | |
| FP | get () const |
| Returns the underlying value. More... | |
| operator FP () const | |
| Explicit conversion to the underlying type. More... | |
| void | serialize (IOContext &io) const |
| serialize this. More... | |
| TypeSafe ()=default | |
| default constructor. More... | |
| TypeSafe (FP t) | |
| value constructor. More... | |
Public Member Functions inherited from mio::OperatorAdditionSubtraction< SimulationTime< FP > > | |
| SimulationTime< FP > | operator+ (const SimulationTime< FP > &other) const |
| SimulationTime< FP > & | operator+= (const SimulationTime< FP > &other) |
| SimulationTime< FP > | operator- (const SimulationTime< FP > &other) const |
| SimulationTime< FP > & | operator-= (const SimulationTime< FP > &other) |
Public Member Functions inherited from mio::OperatorIncrementDecrement< TS > | |
| TS & | operator++ () |
| TS | operator++ (int) |
| TS & | operator-- () |
| TS | operator-- (int) |
Public Member Functions inherited from mio::OperatorScalarMultiplicationDivision< SimulationTime< FP >, FP > | |
| SimulationTime< FP > | operator* (const FP &other) const |
| SimulationTime< FP > & | operator*= (const FP &other) |
| SimulationTime< FP > | operator/ (const FP &other) const |
| SimulationTime< FP > & | operator/= (const FP &other) |
Public Member Functions inherited from mio::OperatorComparison< SimulationTime< FP > > | |
| bool | operator< (const SimulationTime< FP > &other) const |
| bool | operator<= (const SimulationTime< FP > &other) const |
| bool | operator> (const SimulationTime< FP > &other) const |
| bool | operator>= (const SimulationTime< FP > &other) const |
Static Public Member Functions inherited from mio::TypeSafe< FP, SimulationTime< FP > > | |
| static IOResult< SimulationTime< FP > > | deserialize (IOContext &io) |
| deserialize an object of this class. More... | |
Detailed Description
template<typename FP>
class mio::SimulationTime< FP >
Typesafe wrapper for a floating-point simulation time value (in days).
The underlying value can be obtained via the get() member function:
SimulationTime<double> t(3.5);
double days = t.get();
TimeSpan days(int days)
Create a TimeSpan with a specified number of days.
Definition: time.h:348
Supports arithmetic (+, -, *, /) and comparison operators.
- Template Parameters
-
FP Floating point type, e.g., double.
- See also
- TypeSafe
Generated by
Public Types inherited from