FinanceSim 0.1.0
Financial Simulation Library
Loading...
Searching...
No Matches
financesim::CheckingAccount Class Reference

Checking account - the default income recipient, no interest earned. More...

#include <checking_account.hpp>

Inheritance diagram for financesim::CheckingAccount:
[legend]
Collaboration diagram for financesim::CheckingAccount:
[legend]

Public Member Functions

 CheckingAccount (std::string id, std::string name, double initial_balance=0.0, std::string routing_tag="default", Schedule schedule=make_account_schedule())
 
 ~CheckingAccount () override=default
 
- Public Member Functions inherited from financesim::AccountBase
 AccountBase (std::string id, std::string name, std::string routing_tag, double initial_balance=0.0, Schedule schedule=make_account_schedule())
 
virtual ~AccountBase ()=default
 
const std::string & id () const override
 Unique identifier for this model instance.
 
const std::string & name () const override
 Human-readable name/description.
 
const Scheduleschedule () const override
 Get the model's execution schedule.
 
const std::string & routing_tag () const
 Get the routing tag used to match income/expense events.
 
double balance () const
 Get current balance.
 
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
 

Additional Inherited Members

- Protected Member Functions inherited from financesim::AccountBase
EventBusbus ()
 
void deposit (SimTime time, double amount, const std::string &reason)
 Deposit funds into the account.
 
void withdraw (SimTime time, double amount, const std::string &reason)
 Withdraw funds from the account.
 
virtual void on_income (const IncomeEvent &event)
 Called when an income event is routed to this account.
 
virtual void on_expense (const ExpenseEvent &event)
 Called when an expense event is routed to this account.
 
template<typename EventType , typename... Args>
void emit (SimTime time, Args &&... args)
 
- Protected Member Functions inherited from financesim::Model
 Model ()=default
 

Detailed Description

Checking account - the default income recipient, no interest earned.

Definition at line 8 of file checking_account.hpp.

Constructor & Destructor Documentation

◆ CheckingAccount()

financesim::CheckingAccount::CheckingAccount ( std::string  id,
std::string  name,
double  initial_balance = 0.0,
std::string  routing_tag = "default",
Schedule  schedule = make_account_schedule() 
)

Create a checking account

Parameters
idUnique identifier
nameHuman-readable name
initial_balanceStarting balance
routing_tagTag for routing events (defaults to "default")
scheduleExecution schedule (default: no periodic updates)

Definition at line 5 of file checking_account.cpp.

◆ ~CheckingAccount()

financesim::CheckingAccount::~CheckingAccount ( )
overridedefault

The documentation for this class was generated from the following files: