#include <ored/portfolio/additionalfieldgetter.hpp>
Public Member Functions | |
| PortfolioFieldGetter (const QuantLib::ext::shared_ptr< ore::data::Portfolio > &portfolio, const std::set< std::string > &baseFieldNames={}, bool addExtraFields=true) | |
| void | add (const QuantLib::ext::shared_ptr< ore::data::Portfolio > &portfolio, bool addExtraFields=true) |
| void | removeFieldName (const std::string &fieldName) |
| std::set< std::string > | fieldNames () const override |
| Returns the set of additional fields considered relevant by this class. | |
| std::map< std::string, std::string > | fields (const std::string &tradeId) const override |
Returns the map of additional fields for the given trade ID tradeId. | |
| std::string | field (const std::string &tradeId, const std::string &fieldName) const |
| Get additional field for the given trade if it exists. | |
| std::string | npvCurrency (const std::string &tradeId) const override |
Returns the npv currency for a given trade ID tradeId. | |
Concrete implementation of AdditionalFieldGetter that gets the additional fields for each trade in a given portfolio.
| PortfolioFieldGetter | ( | const QuantLib::ext::shared_ptr< ore::data::Portfolio > & | portfolio, |
| const std::set< std::string > & | baseFieldNames = {}, | ||
| bool | addExtraFields = true ) |
Constructor that takes a portfolio and optionally a set of base additional fields
|
overridevirtual |
Returns the set of additional fields considered relevant by this class.
Implements AdditionalFieldGetter.
|
overridevirtual |
Returns the map of additional fields for the given trade ID tradeId.
Implements AdditionalFieldGetter.
|
overridevirtual |
Returns the npv currency for a given trade ID tradeId.
Implements AdditionalFieldGetter.