FISA C++
Redemption.h
1/******************************************************************
2 * Copyright, 2007 - 2012 Financial Technology Laboratories, Inc. *
3 ******************************************************************/
4
5#pragma once
6
7#ifndef COM_FTLABS_FISA_REDEMPTION_H
8#define COM_FTLABS_FISA_REDEMPTION_H
9
10#include "FISADate.h"
11#include "InterestFrequency.h"
12
13namespace com
14{
15 namespace ftlabs
16 {
17 namespace fisa
18 {
29 {
30 private:
31 FISADate date;
32 double value;
33 FISADate lastInterestDate;
34
35 int daysNotice;
36 bool _isDaysNoticeSet;
37
38 public:
46 Redemption( void );
47
58 Redemption( const FISADate &date, double value );
59
73 Redemption(const FISADate &date, double value, int daysNotice);
74
90 Redemption( const FISADate &date, double value, const FISADate &lastInterestDate );
91
109 Redemption(const FISADate &date, double value,
110 const FISADate &lastInterestDate, int daysNotice);
111
112 Redemption( const Redemption& redemption );
113
114 virtual ~Redemption( void );
115
116 Redemption & operator=( const Redemption &redemption );
117 bool operator==( const Redemption &redemption ) const;
118 bool operator!=( const Redemption &redemption ) const;
119 bool operator<( const Redemption &redemption ) const;
120 bool operator>( const Redemption &redemption ) const;
121 bool operator<=( const Redemption &redemption ) const;
122 bool operator>=( const Redemption &redemption ) const;
123
124 /*
125 * Access methods
126 */
127
132 const FISADate & getDate( void ) const;
133
138 void setDate( const FISADate& date );
139
144 double getValue( void ) const;
145
150 void setValue( double value );
151
162 const FISADate * getLastInterestDate( void ) const;
163
176 void setLastInterestDate( const FISADate *lastInterestDate );
177
185 int getDaysNotice() const;
186
199 void setDaysNotice(int daysNotice);
200
207 bool isDaysNoticeSet() const;
208
215 void clearDaysNotice();
216
242 const FISADate &synchronizeDate,
243 const InterestFrequency &interestFrequency,
244 bool eomAdjust );
245
246 bool isEmpty( void ) const;
247 };
248 }
249 }
250}
251
252#endif
This class represents a calendar date, and includes methods to determine synchronicity as well as met...
Definition: FISADate.h:27
This class defines all of the supported interest frequencies.
Definition: InterestFrequency.h:24
A class to represent any redemption date and rate.
Definition: Redemption.h:29
Redemption(void)
This will initialize a Redemption with an empty date, a value of 0.0, a null lastInterestDate and wil...
Definition: Redemption.cpp:8
void clearDaysNotice()
Clears the daysNotice allowing this Redemption to use the daysNotice set for the CallSchedule.
Definition: Redemption.cpp:193
void setDaysNotice(int daysNotice)
Set the daysNotice for this Redemption, which when set will be used to override the daysNotice used f...
Definition: Redemption.cpp:184
const FISADate * getLastInterestDate(void) const
Get the last interest date, which would be the interest date just prior to redemption.
Definition: Redemption.cpp:151
const FISADate * generateLastInterestDate(const FISADate &synchronizeDate, const InterestFrequency &interestFrequency, bool eomAdjust)
Generates a date that would be the interest/dividend date just prior to redemption....
Definition: Redemption.cpp:198
const FISADate & getDate(void) const
Get the redemption date.
Definition: Redemption.cpp:131
bool isDaysNoticeSet() const
Determine if the daysNotice is set.
Definition: Redemption.cpp:189
void setLastInterestDate(const FISADate *lastInterestDate)
Set or clear the last interest date, which would be the interest date just prior to redemption.
Definition: Redemption.cpp:157
double getValue(void) const
Get the redemption value.
Definition: Redemption.cpp:141
int getDaysNotice() const
Get the daysNotice for this Redemption.
Definition: Redemption.cpp:180
void setDate(const FISADate &date)
Set the redemption date.
Definition: Redemption.cpp:136
void setValue(double value)
Set the redemption value.
Definition: Redemption.cpp:146