#include <ored/marketdata/expiry.hpp>
Public Member Functions | |
ExpiryPeriod () | |
Default constructor. More... | |
ExpiryPeriod (const QuantLib::Period &expiryPeriod) | |
Constructor with expiry period. More... | |
const QuantLib::Period & | expiryPeriod () const |
Return the expiry period. More... | |
void | fromString (const std::string &strExpiryPeriod) override |
std::string | toString () const override |
Public Member Functions inherited from Expiry | |
virtual | ~Expiry () |
virtual void | fromString (const std::string &strExpiry)=0 |
Populate the Expiry object from strExpiry . More... | |
virtual std::string | toString () const =0 |
Write the Expiry object to string. More... | |
Protected Member Functions | |
bool | equal_to (const Expiry &other) const override |
Override in derived classes to compare specific expiries. More... | |
virtual bool | equal_to (const Expiry &other) const =0 |
Override in derived classes to compare specific expiries. More... | |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Private Attributes | |
QuantLib::Period | expiryPeriod_ |
Friends | |
class | boost::serialization::access |
Serialization. More... | |
Expiry consisting of a period
Definition at line 99 of file expiry.hpp.
ExpiryPeriod | ( | ) |
ExpiryPeriod | ( | const QuantLib::Period & | expiryPeriod | ) |
Constructor with expiry period.
const Period & expiryPeriod | ( | ) | const |
Return the expiry period.
Definition at line 64 of file expiry.cpp.
|
overridevirtual |
Populate ExpiryPeriod object from strExpiryPeriod
which should be a period. An exception is thrown if strExpiryPeriod
cannot be parsed as a QuantLib::Period
.
Implements Expiry.
Definition at line 66 of file expiry.cpp.
|
overridevirtual |
Writes the ExpiryPeriod object to string. This returns the string representation of the expiry period.
Implements Expiry.
Definition at line 68 of file expiry.cpp.
Override in derived classes to compare specific expiries.
Implements Expiry.
Definition at line 70 of file expiry.cpp.
|
private |
Definition at line 78 of file expiry.cpp.
|
friend |
Serialization.
Definition at line 126 of file expiry.hpp.
|
private |
Definition at line 124 of file expiry.hpp.