Initial
This commit is contained in:
153
cashflow/PASSTHRU.HPP
Normal file
153
cashflow/PASSTHRU.HPP
Normal file
@@ -0,0 +1,153 @@
|
||||
#ifndef _CASHFLOW_PUREPASSTHRU_HPP_
|
||||
#define _CASHFLOW_PUREPASSTHRU_HPP_
|
||||
#include <common/windows.hpp>
|
||||
|
||||
class PurePassThru
|
||||
{
|
||||
public:
|
||||
PurePassThru(void);
|
||||
PurePassThru(double issBal,double wac,double coupon,short wam,short origTerm,double psa);
|
||||
PurePassThru(const PurePassThru &somePurePassThru);
|
||||
~PurePassThru();
|
||||
PurePassThru &operator=(const PurePassThru &somePurePassThru);
|
||||
WORD size(void)const;
|
||||
double issBal(void)const;
|
||||
void issBal(double newIssBal);
|
||||
double wac(void)const;
|
||||
void wac(double newWAC);
|
||||
double coupon(void)const;
|
||||
void coupon(double newCoupon);
|
||||
short wam(void)const;
|
||||
void wam(short newWAM);
|
||||
short origTerm(void)const;
|
||||
void origTerm(short newOrigTerm);
|
||||
double psa(void)const;
|
||||
void psa(double newPSA);
|
||||
private:
|
||||
WORD mSanity;
|
||||
double mIssBal;
|
||||
double mWAC;
|
||||
double mCoupon;
|
||||
short mWAM;
|
||||
short mOrigTerm;
|
||||
double mPSA;
|
||||
};
|
||||
|
||||
#pragma warning(disable:4355)
|
||||
inline
|
||||
PurePassThru::PurePassThru(void)
|
||||
: mSanity(sizeof(*this)), mIssBal(0.00), mWAC(0.00), mCoupon(0.00), mWAM(0), mOrigTerm(0),
|
||||
mPSA(100.00)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
PurePassThru::PurePassThru(const PurePassThru &somePurePassThru)
|
||||
: mSanity(sizeof(*this))
|
||||
{
|
||||
*this=somePurePassThru;
|
||||
}
|
||||
|
||||
inline
|
||||
PurePassThru::PurePassThru(double issBal,double wac,double coupon,short wam,short origTerm,double psa)
|
||||
: mSanity(sizeof(*this)), mIssBal(issBal), mWAC(wac), mCoupon(coupon), mWAM(wam),
|
||||
mOrigTerm(origTerm), mPSA(psa)
|
||||
{
|
||||
}
|
||||
#pragma warning(default:4355)
|
||||
|
||||
inline
|
||||
PurePassThru::~PurePassThru()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
double PurePassThru::issBal(void)const
|
||||
{
|
||||
return mIssBal;
|
||||
}
|
||||
|
||||
inline
|
||||
void PurePassThru::issBal(double newIssBal)
|
||||
{
|
||||
mIssBal=newIssBal;
|
||||
}
|
||||
|
||||
inline
|
||||
double PurePassThru::wac(void)const
|
||||
{
|
||||
return mWAC;
|
||||
}
|
||||
|
||||
inline
|
||||
void PurePassThru::wac(double newWAC)
|
||||
{
|
||||
mWAC=newWAC;
|
||||
}
|
||||
|
||||
inline
|
||||
double PurePassThru::coupon(void)const
|
||||
{
|
||||
return mCoupon;
|
||||
}
|
||||
|
||||
inline
|
||||
void PurePassThru::coupon(double newCoupon)
|
||||
{
|
||||
mCoupon=newCoupon;
|
||||
}
|
||||
|
||||
inline
|
||||
short PurePassThru::wam(void)const
|
||||
{
|
||||
return mWAM;
|
||||
}
|
||||
|
||||
inline
|
||||
void PurePassThru::wam(short newWAM)
|
||||
{
|
||||
mWAM=newWAM;
|
||||
}
|
||||
|
||||
inline
|
||||
short PurePassThru::origTerm(void)const
|
||||
{
|
||||
return mOrigTerm;
|
||||
}
|
||||
|
||||
inline
|
||||
void PurePassThru::origTerm(short newOrigTerm)
|
||||
{
|
||||
mOrigTerm=newOrigTerm;
|
||||
}
|
||||
|
||||
inline
|
||||
double PurePassThru::psa(void)const
|
||||
{
|
||||
return mPSA;
|
||||
}
|
||||
|
||||
inline
|
||||
void PurePassThru::psa(double newPSA)
|
||||
{
|
||||
mPSA=newPSA;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD PurePassThru::size(void)const
|
||||
{
|
||||
return mSanity;
|
||||
}
|
||||
|
||||
inline
|
||||
PurePassThru &PurePassThru::operator=(const PurePassThru &somePurePassThru)
|
||||
{
|
||||
issBal(somePurePassThru.issBal());
|
||||
wac(somePurePassThru.wac());
|
||||
coupon(somePurePassThru.coupon());
|
||||
wam(somePurePassThru.wam());
|
||||
origTerm(somePurePassThru.origTerm());
|
||||
psa(somePurePassThru.psa());
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user