|
FinanceSim 0.1.0
Financial Simulation Library
|
#include <income_base.hpp>
Public Member Functions | |
| IncomeBase (std::string id, std::string name, Schedule schedule) | |
| virtual | ~IncomeBase ()=default |
| const std::string & | id () const override |
| Unique identifier for this model instance. | |
| const std::string & | name () const override |
| Human-readable name/description. | |
| const Schedule & | schedule () const override |
| Get the model's execution schedule. | |
| void | initialize (EventBus &bus) override |
| void | update (SimTime time) override |
| void | finalize () override |
| void | reset () override |
| Reset model to initial state (for replay) | |
Public Member Functions inherited from financesim::Model | |
| virtual | ~Model ()=default |
Protected Member Functions | |
| EventBus & | bus () |
| template<typename EventType , typename... Args> | |
| void | emit (SimTime time, Args &&... args) |
Protected Member Functions inherited from financesim::Model | |
| Model ()=default | |
Private Attributes | |
| std::string | id_ |
| std::string | name_ |
| Schedule | schedule_ |
| EventBus * | bus_ = nullptr |
Base class for income models Derive from this to create specific income types (salary, dividends, etc.)
Definition at line 9 of file income_base.hpp.
| financesim::IncomeBase::IncomeBase | ( | std::string | id, |
| std::string | name, | ||
| Schedule | schedule | ||
| ) |
Definition at line 5 of file income_base.cpp.
|
virtualdefault |
|
inlineprotected |
Definition at line 24 of file income_base.hpp.
References bus_.
Referenced by initialize().
|
inlineprotected |
Definition at line 27 of file income_base.hpp.
References bus_, emit(), id_, and financesim::EventBus::publish().
Referenced by emit(), and financesim::CareerJob::update().
|
overridevirtual |
Called once after simulation ends Use for cleanup, final calculations, releasing resources
Implements financesim::Model.
Definition at line 19 of file income_base.cpp.
|
inlineoverridevirtual |
Unique identifier for this model instance.
Implements financesim::Model.
Definition at line 14 of file income_base.hpp.
References id_.
Called once before simulation starts Use for setup, subscribing to events, allocating resources
Implements financesim::Model.
Definition at line 10 of file income_base.cpp.
|
inlineoverridevirtual |
Human-readable name/description.
Implements financesim::Model.
Definition at line 15 of file income_base.hpp.
References name_.
|
overridevirtual |
Reset model to initial state (for replay)
Implements financesim::Model.
Definition at line 23 of file income_base.cpp.
References bus_.
Referenced by financesim::CareerJob::reset().
Get the model's execution schedule.
Implements financesim::Model.
Definition at line 16 of file income_base.hpp.
References schedule_.
Called at each scheduled execution time Must be deterministic given the same inputs and time
Implements financesim::Model.
Definition at line 15 of file income_base.cpp.
Definition at line 41 of file income_base.hpp.
Referenced by bus(), emit(), initialize(), and reset().
|
private |
Definition at line 38 of file income_base.hpp.
|
private |
Definition at line 39 of file income_base.hpp.
Referenced by name().
|
private |
Definition at line 40 of file income_base.hpp.
Referenced by schedule().