|
contur2
|
Concrete simulation clock — a simple monotonic tick counter. More...
#include <clock.h>


Public Member Functions | |
| SimulationClock () | |
| Constructs a new simulation clock initialized to tick 0. | |
| ~SimulationClock () override | |
| SimulationClock (const SimulationClock &)=delete | |
| SimulationClock & | operator= (const SimulationClock &)=delete |
| SimulationClock (SimulationClock &&) noexcept | |
| SimulationClock & | operator= (SimulationClock &&) noexcept |
| Tick | now () const noexcept override |
| Returns the current simulation tick. | |
| void | tick () override |
| Advances the simulation clock by one tick. | |
| void | reset () override |
| Resets the clock to tick 0. | |
| Public Member Functions inherited from contur::IClock | |
| virtual | ~IClock ()=default |
Private Attributes | |
| std::unique_ptr< Impl > | impl_ |
Concrete simulation clock — a simple monotonic tick counter.
Stores clock state behind a PIMPL boundary and provides the default clock implementation used by kernel subsystems and demos.
| contur::SimulationClock::SimulationClock | ( | ) |
Constructs a new simulation clock initialized to tick 0.
|
override |
|
delete |
|
noexcept |
|
nodiscardoverridevirtualnoexcept |
Returns the current simulation tick.
Implements contur::IClock.
|
delete |
|
noexcept |
|
overridevirtual |
|
overridevirtual |
Advances the simulation clock by one tick.
Implements contur::IClock.