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

Career job income model with semi-monthly salary payments. More...

#include <career_job.hpp>

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

Public Member Functions

 CareerJob (std::string id, std::string name, double annual_salary, SimTime start_day=0.0)
 Construct a CareerJob model.
 
double annual_salary () const
 Get the annual salary.
 
double payment_amount () const
 Get the per-paycheck amount (annual / 24)
 
void update (SimTime time) override
 
void reset () override
 Reset model to initial state (for replay)
 
- Public Member Functions inherited from financesim::IncomeBase
 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 Scheduleschedule () 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
 

Private Attributes

double annual_salary_
 
double payment_amount_
 

Additional Inherited Members

- Protected Member Functions inherited from financesim::IncomeBase
EventBusbus ()
 
template<typename EventType , typename... Args>
void emit (SimTime time, Args &&... args)
 
- Protected Member Functions inherited from financesim::Model
 Model ()=default
 

Detailed Description

Career job income model with semi-monthly salary payments.

Represents a salaried career position that pays twice per month. The payment amount is calculated as annual_salary / 24.

Definition at line 11 of file career_job.hpp.

Constructor & Destructor Documentation

◆ CareerJob()

financesim::CareerJob::CareerJob ( std::string  id,
std::string  name,
double  annual_salary,
SimTime  start_day = 0.0 
)

Construct a CareerJob model.

Parameters
idUnique identifier for this model instance
nameHuman-readable name (e.g., "Software Engineer at Acme Corp")
annual_salaryGross annual salary in dollars
start_dayDay (in SimTime) when employment begins

Definition at line 11 of file career_job.cpp.

Member Function Documentation

◆ annual_salary()

double financesim::CareerJob::annual_salary ( ) const
inline

Get the annual salary.

Definition at line 21 of file career_job.hpp.

References annual_salary_.

Referenced by PYBIND11_MODULE().

Here is the caller graph for this function:

◆ payment_amount()

double financesim::CareerJob::payment_amount ( ) const
inline

Get the per-paycheck amount (annual / 24)

Definition at line 24 of file career_job.hpp.

References payment_amount_.

Referenced by PYBIND11_MODULE().

Here is the caller graph for this function:

◆ reset()

void financesim::CareerJob::reset ( )
overridevirtual

Reset model to initial state (for replay)

Implements financesim::Model.

Definition at line 23 of file career_job.cpp.

References financesim::IncomeBase::reset().

Here is the call graph for this function:

◆ update()

void financesim::CareerJob::update ( SimTime  time)
overridevirtual

Called at each scheduled execution time Must be deterministic given the same inputs and time

Implements financesim::Model.

Definition at line 19 of file career_job.cpp.

References financesim::IncomeBase::emit(), and payment_amount_.

Here is the call graph for this function:

Member Data Documentation

◆ annual_salary_

double financesim::CareerJob::annual_salary_
private

Definition at line 30 of file career_job.hpp.

Referenced by annual_salary().

◆ payment_amount_

double financesim::CareerJob::payment_amount_
private

Definition at line 31 of file career_job.hpp.

Referenced by payment_amount(), and update().


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