Logo
Reference manual - version ored_version
Public Member Functions | Protected Member Functions | Friends | List of all members
ExpiryPeriod Class Reference

#include <ored/marketdata/expiry.hpp>

+ Inheritance diagram for ExpiryPeriod:

Public Member Functions

 ExpiryPeriod ()
 Default constructor.
 
 ExpiryPeriod (const QuantLib::Period &expiryPeriod)
 Constructor with expiry period.
 
const QuantLib::Period & expiryPeriod () const
 Return the expiry period.
 
void fromString (const std::string &strExpiryPeriod) override
 
std::string toString () const override
 

Protected Member Functions

bool equal_to (const Expiry &other) const override
 Override in derived classes to compare specific expiries.
 

Friends

class boost::serialization::access
 Serialization.
 

Detailed Description

Expiry consisting of a period

Member Function Documentation

◆ fromString()

void fromString ( const std::string &  strExpiryPeriod)
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.

◆ toString()

std::string toString ( ) const
overridevirtual

Writes the ExpiryPeriod object to string. This returns the string representation of the expiry period.

Implements Expiry.