49 const char*
type_name()
const override {
return "IncomeEvent"; }
72 const char*
type_name()
const override {
return "ExpenseEvent"; }
94 const char*
type_name()
const override {
return "AssetEvent"; }
116 const char*
type_name()
const override {
return "LiabilityEvent"; }
140 const char*
type_name()
const override {
return "AccountEvent"; }
166 const char*
type_name()
const override {
return "TransferEvent"; }
Event emitted when an account balance changes.
AccountEvent(SimTime timestamp, std::string source_id, std::string account_id, double balance, double delta, std::string reason)
const char * type_name() const override
Returns the type name of this event (for debugging/logging)
const std::string & reason() const
const std::string & account_id() const
Event emitted when asset value changes.
AssetEvent(SimTime timestamp, std::string source_id, std::string asset_id, double value, double delta)
const char * type_name() const override
Returns the type name of this event (for debugging/logging)
const std::string & asset_id() const
Base class for all typed events in the simulation.
const std::string & source_id() const
Source model ID that generated this event.
Event(SimTime timestamp, std::string source_id)
virtual const char * type_name() const =0
Returns the type name of this event (for debugging/logging)
SimTime timestamp() const
Time at which this event was generated.
Event emitted when an expense occurs.
ExpenseEvent(SimTime timestamp, std::string source_id, double amount, std::string category, std::string target_account="")
const char * type_name() const override
Returns the type name of this event (for debugging/logging)
const std::string & category() const
std::string target_account_
const std::string & target_account() const
Event emitted when income is received.
const std::string & target_account() const
const char * type_name() const override
Returns the type name of this event (for debugging/logging)
const std::string & category() const
std::string target_account_
IncomeEvent(SimTime timestamp, std::string source_id, double amount, std::string category, std::string target_account="")
Event emitted when liability value changes.
const char * type_name() const override
Returns the type name of this event (for debugging/logging)
LiabilityEvent(SimTime timestamp, std::string source_id, std::string liability_id, double value, double delta)
std::string liability_id_
const std::string & liability_id() const
Event emitted when funds are transferred between accounts.
TransferEvent(SimTime timestamp, std::string source_id, std::string from_account, std::string to_account, double amount, std::string reason)
const std::string & reason() const
const std::string & from_account() const
const char * type_name() const override
Returns the type name of this event (for debugging/logging)
const std::string & to_account() const
std::string from_account_
double SimTime
Represents a point in simulation time (continuous, in days)
std::shared_ptr< const Event > EventPtr