Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | List of all members
XMLSerializable Class Referenceabstract

Base class for all serializable classes. More...

#include <ored/utilities/xmlutils.hpp>

+ Inheritance diagram for XMLSerializable:
+ Collaboration diagram for XMLSerializable:

Public Member Functions

virtual ~XMLSerializable ()
 
virtual void fromXML (XMLNode *node)=0
 
virtual XMLNodetoXML (XMLDocument &doc) const =0
 
void fromFile (const std::string &filename)
 
void toFile (const std::string &filename) const
 
void fromXMLString (const std::string &xml)
 Parse from XML string. More...
 
std::string toXMLString () const
 Parse from XML string. More...
 

Detailed Description

Base class for all serializable classes.

Definition at line 101 of file xmlutils.hpp.

Constructor & Destructor Documentation

◆ ~XMLSerializable()

virtual ~XMLSerializable ( )
virtual

Definition at line 103 of file xmlutils.hpp.

103{}

Member Function Documentation

◆ fromXML()

virtual void fromXML ( XMLNode node)
pure virtual

Implemented in BootstrapConfig, OneDimSolverConfig, ParametricSmileConfiguration::Parameter, ParametricSmileConfiguration::Calibration, ParametricSmileConfiguration, ProxyVolatilityConfig, CDSProxyVolatilityConfig, ConstantVolatilityConfig, VolatilityCurveConfig, VolatilityStrikeSurfaceConfig, VolatilityDeltaSurfaceConfig, VolatilityMoneynessSurfaceConfig, VolatilityApoFutureSurfaceConfig, AdjustmentFactors, BGSTrancheData, BalanceGuaranteedSwap, BarrierData, BarrierOption, FxOptionWithBarrier, EquityOptionWithBarrier, BasketConstituent, BasketData, CallableSwap, CliquetOption, CollateralBalance, CollateralBalances, CommodityAveragePriceOption, CommodityDigitalAveragePriceOption, CommodityFixedLegData, CommodityFloatingLegData, CommodityOptionStrip, CommoditySwap, CommoditySwaption, ConvertibleBondData::CallabilityData::MakeWholeData::ConversionRatioIncreaseData, ConvertibleBondData::CallabilityData::MakeWholeData, ConvertibleBondData::CallabilityData, ConvertibleBondData::ConversionData::ContingentConversionData, ConvertibleBondData::ConversionData::MandatoryConversionData::PepsData, ConvertibleBondData::ConversionData::MandatoryConversionData, ConvertibleBondData::ConversionData::ConversionResetData, ConvertibleBondData::ConversionData::ExchangeableData, ConvertibleBondData::ConversionData::FixedAmountConversionData, ConvertibleBondData::ConversionData, ConvertibleBondData::DividendProtectionData, ConvertibleBondData, EquityMarginLegData, FailedTrade, FlexiSwap, IndexCreditDefaultSwapData, IndexCreditDefaultSwapOption, RangeBound, RiskParticipationAgreement, Underlying, BaseCorrelationCurveConfig, CapFloorVolatilityCurveConfig, CDSVolatilityCurveConfig, PriceSegment::OffPeakDaily, PriceSegment, CommodityCurveConfig, CommodityVolatilityConfig, Conventions, ZeroRateConvention, DepositConvention, FutureConvention, FraConvention, OisConvention, IborIndexConvention, OvernightIndexConvention, SwapIndexConvention, IRSwapConvention, AverageOisConvention, TenorBasisSwapConvention, TenorBasisTwoSwapConvention, BMABasisSwapConvention, FXConvention, CrossCcyBasisSwapConvention, CrossCcyFixFloatSwapConvention, InflationSwapConvention, SecuritySpreadConvention, CmsSpreadOptionConvention, CommodityForwardConvention, CommodityFutureConvention::AveragingData, CommodityFutureConvention::OffPeakPowerIndexData, CommodityFutureConvention::ProhibitedExpiry, CommodityFutureConvention, FxOptionConvention, ZeroInflationIndexConvention, BondYieldConvention, CorrelationCurveConfig, CurrencyConfig, CurveConfigurations, DefaultCurveConfig::Config, DefaultCurveConfig, EquityCurveConfig, EquityVolatilityCurveConfig, FXSpotConfig, FXVolatilityCurveConfig, GenericYieldVolatilityCurveConfig, IborFallbackConfig, InflationCapFloorVolatilityCurveConfig, InflationCurveConfig, ReportConfig, SecurityConfig, VolatilityConfigBuilder, YieldCurveSegment, DirectYieldCurveSegment, SimpleYieldCurveSegment, AverageOISYieldCurveSegment, TenorBasisYieldCurveSegment, CrossCcyYieldCurveSegment, ZeroSpreadedYieldCurveSegment, WeightedAverageYieldCurveSegment, YieldPlusDefaultYieldCurveSegment, DiscountRatioYieldCurveSegment, FittedBondYieldCurveSegment, IborFallbackCurveSegment, BondYieldShiftedYieldCurveSegment, YieldCurveConfig, TodaysMarketParameters, CalibrationBasket, CalibrationConfiguration, CpiCapFloor, YoYCapFloor, YoYSwap, CrCirData, CrLgmData, InstantaneousCorrelations, CrossAssetModelData, InfDkData, InfJyData, InflationModelData, HwModelData, IrLgmData, IrModelData, LgmData, LgmReversionTransformation, ModelData, ModelParameter, VolatilityParameter, ReversionParameter, Accumulator, Ascot, AsianOption, Autocallable_01, BasketOption, BasketVarianceSwap, BestEntryOption, BondData, Bond, BondBasket, BondOption, BondPositionData, BondPosition, BondRepo, BondTRS, CapFloor, CboReferenceDatum::CboStructure, CboReferenceDatum, CBO, SyntheticCDO, CommodityDigitalOption, CommodityForward, CommodityOption, CommodityPositionData, CommodityPosition, CommoditySpreadOptionData::OptionStripData, CommoditySpreadOptionData, CommoditySpreadOption, CompositeTrade, ConvertibleBond, ConvertibleBondReferenceDatum, CreditDefaultSwap, CdsReferenceInformation, CreditDefaultSwapData, CreditDefaultSwapOption::AuctionSettlementInformation, CreditDefaultSwapOption, CreditLinkedSwap, DoubleDigitalOption, DurationAdjustedCmsLegData, EngineData, Envelope, EquityDigitalOption, EquityDoubleTouchOption, EquityEuropeanBarrierOption, EquityForward, EquityFutureOption, EquityOption, EquityOptionUnderlyingData, EquityOptionPositionData, EquityOptionPosition, EquityOutperformanceOption, EquityPositionData, EquityPosition, EquityTouchOption, EuropeanOptionBarrier, FormulaBasedLegData, ForwardBond, ForwardRateAgreement, FxAverageForward, FxDigitalBarrierOption, FxDigitalOption, FxDoubleTouchOption, FxEuropeanBarrierOption, FxForward, FxKIKOBarrierOption, FxOption, FxSwap, FxTouchOption, GenericBarrierOption, IndexCreditDefaultSwap, Indexing, KnockOutSwap, CashflowData, FixedLegData, ZeroCouponFixedLegData, FloatingLegData, CPILegData, YoYLegData, CMSLegData, DigitalCMSLegData, CMSSpreadLegData, DigitalCMSSpreadLegData, CMBLegData, EquityLegData, AmortizationData, LegData, MultiLegOption, NettingSetDefinition, NettingSetDetails, NettingSetManager, OptionData, OptionExerciseData, OptionPaymentData, PairwiseVarSwap, PerformanceOption_01, Portfolio, PremiumData, RainbowOption, ReferenceDatum, BondReferenceDatum::BondData, BondReferenceDatum, CreditIndexConstituent, CreditIndexReferenceDatum, IndexReferenceDatum, CurrencyHedgedEquityIndexReferenceDatum, PortfolioBasketReferenceDatum, CreditReferenceDatum, EquityReferenceDatum, BondBasketReferenceDatum, BasicReferenceDataManager, ScheduleRules, ScheduleDates, ScheduleDerived, ScheduleData, ScriptedTradeEventData, ScriptedTradeValueTypeData, ScriptedTradeScriptData::NewScheduleData, ScriptedTradeScriptData::CalibrationData, ScriptedTradeScriptData, ScriptLibraryData, ScriptedTrade, Swap, Swaption, TaRF, TreasuryLockData, Trade, TradeAction, TradeActions, TrancheData, TRS::ReturnData, TRS::FundingData, TRS::AdditionalCashflowData, TRS, BasicUnderlying, EquityUnderlying, CommodityUnderlying, FXUnderlying, InterestRateUnderlying, InflationUnderlying, CreditUnderlying, BondUnderlying, UnderlyingBuilder, VarSwap, WindowBarrierOption, WorstOfBasketSwap, CalendarAdjustmentConfig, and CdsConvention.

+ Here is the caller graph for this function:

◆ toXML()

virtual XMLNode * toXML ( XMLDocument doc) const
pure virtual

Implemented in BootstrapConfig, CDSVolatilityCurveConfig, CommodityVolatilityConfig, OneDimSolverConfig, ParametricSmileConfiguration::Parameter, ParametricSmileConfiguration::Calibration, ParametricSmileConfiguration, ProxyVolatilityConfig, CDSProxyVolatilityConfig, ConstantVolatilityConfig, VolatilityCurveConfig, VolatilityStrikeSurfaceConfig, VolatilityDeltaSurfaceConfig, VolatilityMoneynessSurfaceConfig, VolatilityApoFutureSurfaceConfig, VolatilityConfigBuilder, AdjustmentFactors, BGSTrancheData, BalanceGuaranteedSwap, BarrierData, BarrierOption, FxOptionWithBarrier, EquityOptionWithBarrier, BasketConstituent, BasketData, BondBasket, CallableSwap, CboReferenceDatum::CboStructure, CboReferenceDatum, CliquetOption, CollateralBalance, CollateralBalances, CommodityAveragePriceOption, CommodityDigitalAveragePriceOption, CommodityFixedLegData, CommodityFloatingLegData, CommodityOptionStrip, CommoditySwap, CommoditySwaption, ConvertibleBondData::CallabilityData::MakeWholeData::ConversionRatioIncreaseData, ConvertibleBondData::CallabilityData::MakeWholeData, ConvertibleBondData::CallabilityData, ConvertibleBondData::ConversionData::ContingentConversionData, ConvertibleBondData::ConversionData::MandatoryConversionData::PepsData, ConvertibleBondData::ConversionData::MandatoryConversionData, ConvertibleBondData::ConversionData::ConversionResetData, ConvertibleBondData::ConversionData::ExchangeableData, ConvertibleBondData::ConversionData::FixedAmountConversionData, ConvertibleBondData::ConversionData, ConvertibleBondData::DividendProtectionData, ConvertibleBondData, ConvertibleBondReferenceDatum, CreditLinkedSwap, EquityMarginLegData, FailedTrade, FlexiSwap, IndexCreditDefaultSwap, IndexCreditDefaultSwapData, IndexCreditDefaultSwapOption, RangeBound, ReferenceDatum, BondReferenceDatum::BondData, BondReferenceDatum, CreditIndexConstituent, CreditIndexReferenceDatum, IndexReferenceDatum, CurrencyHedgedEquityIndexReferenceDatum, PortfolioBasketReferenceDatum, CreditReferenceDatum, EquityReferenceDatum, BondBasketReferenceDatum, BasicReferenceDataManager, RiskParticipationAgreement, ScriptedTradeEventData, ScriptedTradeValueTypeData, ScriptedTradeScriptData::NewScheduleData, ScriptedTradeScriptData::CalibrationData, ScriptedTradeScriptData, ScriptLibraryData, ScriptedTrade, TrancheData, Underlying, UnderlyingBuilder, VarSwap, BaseCorrelationCurveConfig, CapFloorVolatilityCurveConfig, PriceSegment::OffPeakDaily, PriceSegment, CommodityCurveConfig, Conventions, ZeroRateConvention, DepositConvention, FutureConvention, FraConvention, OisConvention, IborIndexConvention, OvernightIndexConvention, SwapIndexConvention, IRSwapConvention, AverageOisConvention, TenorBasisSwapConvention, TenorBasisTwoSwapConvention, BMABasisSwapConvention, FXConvention, CrossCcyBasisSwapConvention, CrossCcyFixFloatSwapConvention, CdsConvention, InflationSwapConvention, SecuritySpreadConvention, CmsSpreadOptionConvention, CommodityForwardConvention, CommodityFutureConvention::AveragingData, CommodityFutureConvention::OffPeakPowerIndexData, CommodityFutureConvention::ProhibitedExpiry, CommodityFutureConvention, FxOptionConvention, ZeroInflationIndexConvention, BondYieldConvention, CorrelationCurveConfig, CurrencyConfig, CurveConfigurations, DefaultCurveConfig::Config, DefaultCurveConfig, EquityCurveConfig, EquityVolatilityCurveConfig, FXSpotConfig, FXVolatilityCurveConfig, GenericYieldVolatilityCurveConfig, IborFallbackConfig, InflationCapFloorVolatilityCurveConfig, InflationCurveConfig, ReportConfig, SecurityConfig, YieldCurveSegment, DirectYieldCurveSegment, SimpleYieldCurveSegment, AverageOISYieldCurveSegment, TenorBasisYieldCurveSegment, CrossCcyYieldCurveSegment, ZeroSpreadedYieldCurveSegment, WeightedAverageYieldCurveSegment, YieldPlusDefaultYieldCurveSegment, DiscountRatioYieldCurveSegment, FittedBondYieldCurveSegment, IborFallbackCurveSegment, BondYieldShiftedYieldCurveSegment, YieldCurveConfig, TodaysMarketParameters, CalibrationBasket, CalibrationConfiguration, CpiCapFloor, YoYCapFloor, YoYSwap, CrCirData, CrLgmData, InstantaneousCorrelations, CrossAssetModelData, InfDkData, InfJyData, HwModelData, IrLgmData, IrModelData, LgmData, LgmReversionTransformation, VolatilityParameter, ReversionParameter, Accumulator, Ascot, AsianOption, Autocallable_01, BasketOption, BasketVarianceSwap, BestEntryOption, BondData, Bond, BondOption, BondPositionData, BondPosition, BondRepo, BondTRS, CapFloor, CBO, SyntheticCDO, CommodityDigitalOption, CommodityForward, CommodityOption, CommodityPositionData, CommodityPosition, CommoditySpreadOptionData::OptionStripData, CommoditySpreadOptionData, CommoditySpreadOption, CompositeTrade, ConvertibleBond, CreditDefaultSwap, CdsReferenceInformation, CreditDefaultSwapData, CreditDefaultSwapOption::AuctionSettlementInformation, CreditDefaultSwapOption, DoubleDigitalOption, DurationAdjustedCmsLegData, EngineData, Envelope, EquityDigitalOption, EquityDoubleTouchOption, EquityEuropeanBarrierOption, EquityForward, EquityFutureOption, EquityOption, EquityOptionUnderlyingData, EquityOptionPositionData, EquityOptionPosition, EquityOutperformanceOption, EquityPositionData, EquityPosition, EquityTouchOption, EuropeanOptionBarrier, FormulaBasedLegData, ForwardBond, ForwardRateAgreement, FxAverageForward, FxDigitalBarrierOption, FxDigitalOption, FxDoubleTouchOption, FxEuropeanBarrierOption, FxForward, FxKIKOBarrierOption, FxOption, FxSwap, FxTouchOption, GenericBarrierOption, Indexing, KnockOutSwap, CashflowData, FixedLegData, ZeroCouponFixedLegData, FloatingLegData, CPILegData, YoYLegData, CMSLegData, DigitalCMSLegData, CMSSpreadLegData, DigitalCMSSpreadLegData, CMBLegData, EquityLegData, AmortizationData, LegData, MultiLegOption, NettingSetDefinition, NettingSetDetails, NettingSetManager, OptionData, OptionExerciseData, OptionPaymentData, PairwiseVarSwap, PerformanceOption_01, Portfolio, PremiumData, RainbowOption, ScheduleRules, ScheduleDates, ScheduleDerived, ScheduleData, Swap, Swaption, TaRF, TreasuryLockData, Trade, TradeAction, TradeActions, TRS::ReturnData, TRS::FundingData, TRS::AdditionalCashflowData, TRS, BasicUnderlying, EquityUnderlying, CommodityUnderlying, FXUnderlying, InterestRateUnderlying, InflationUnderlying, CreditUnderlying, BondUnderlying, WindowBarrierOption, WorstOfBasketSwap, and CalendarAdjustmentConfig.

+ Here is the caller graph for this function:

◆ fromFile()

void fromFile ( const std::string &  filename)

Definition at line 150 of file xmlutils.cpp.

150 {
151 XMLDocument doc(filename);
152 fromXML(doc.getFirstNode(""));
153}
virtual void fromXML(XMLNode *node)=0
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toFile()

void toFile ( const std::string &  filename) const

Definition at line 155 of file xmlutils.cpp.

155 {
156 XMLDocument doc;
157 XMLNode* node = toXML(doc);
158 doc.appendNode(node);
159 doc.toFile(filename);
160}
virtual XMLNode * toXML(XMLDocument &doc) const =0
rapidxml::xml_node< char > XMLNode
Definition: xmlutils.hpp:60
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fromXMLString()

void fromXMLString ( const std::string &  xml)

Parse from XML string.

Definition at line 162 of file xmlutils.cpp.

162 {
164 doc.fromXMLString(xml);
165 fromXML(doc.getFirstNode(""));
166}
Small XML Document wrapper class.
Definition: xmlutils.hpp:65
void fromXMLString(const string &xmlString)
load a document from a hard-coded string
Definition: xmlutils.cpp:103
XMLNode * getFirstNode(const string &name) const
Definition: xmlutils.cpp:116
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toXMLString()

string toXMLString ( ) const

Parse from XML string.

Definition at line 168 of file xmlutils.cpp.

168 {
169 XMLDocument doc;
170 XMLNode* node = toXML(doc);
171 doc.appendNode(node);
172 return doc.toString();
173}
+ Here is the call graph for this function:
+ Here is the caller graph for this function: