Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
CurveConfigurationsManager Class Reference

#include <ored/configuration/curveconfigurations.hpp>

+ Collaboration diagram for CurveConfigurationsManager:

Public Member Functions

 CurveConfigurationsManager ()
 
void add (const QuantLib::ext::shared_ptr< CurveConfigurations > &config, std::string id=std::string())
 
const QuantLib::ext::shared_ptr< CurveConfigurations > & get (std::string id=std::string()) const
 
const bool has (std::string id=std::string()) const
 
const std::map< std::string, QuantLib::ext::shared_ptr< CurveConfigurations > > & curveConfigurations () const
 
const bool empty () const
 

Private Attributes

std::map< std::string, QuantLib::ext::shared_ptr< CurveConfigurations > > configs_
 

Detailed Description

Definition at line 183 of file curveconfigurations.hpp.

Constructor & Destructor Documentation

◆ CurveConfigurationsManager()

Definition at line 185 of file curveconfigurations.hpp.

185{}

Member Function Documentation

◆ add()

void add ( const QuantLib::ext::shared_ptr< CurveConfigurations > &  config,
std::string  id = std::string() 
)

Definition at line 630 of file curveconfigurations.cpp.

630 {
631 configs_[id] = config;
632}
std::map< std::string, QuantLib::ext::shared_ptr< CurveConfigurations > > configs_

◆ get()

const QuantLib::ext::shared_ptr< CurveConfigurations > & get ( std::string  id = std::string()) const

Definition at line 634 of file curveconfigurations.cpp.

634 {
635 auto it = configs_.find(id);
636 if (it == configs_.end()) {
637 WLOG("CurveConfigurationsManager: could not find CurveConfiguration for id "
638 << id << ", attempting to get default curveConfig.");
639 it = configs_.find("");
640 QL_REQUIRE(it != configs_.end(), "CurveConfigurationsManager: could not find CurveConfiguration for id " << id);
641 }
642 return it->second;
643}
#define WLOG(text)
Logging Macro (Level = Warning)
Definition: log.hpp:550

◆ has()

const bool has ( std::string  id = std::string()) const

Definition at line 645 of file curveconfigurations.cpp.

645 {
646 auto it = configs_.find(id);
647 return it != configs_.end();
648}

◆ curveConfigurations()

const std::map< std::string, QuantLib::ext::shared_ptr< CurveConfigurations > > & curveConfigurations ( ) const

Definition at line 650 of file curveconfigurations.cpp.

650 {
651 return configs_;
652}

◆ empty()

const bool empty ( ) const

Definition at line 654 of file curveconfigurations.cpp.

654 {
655 return configs_.size() == 0;
656}

Member Data Documentation

◆ configs_

std::map<std::string, QuantLib::ext::shared_ptr<CurveConfigurations> > configs_
private

Definition at line 195 of file curveconfigurations.hpp.