Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv3349/qlo
Added Files:
vo_assetswap.cpp vo_assetswap.hpp
Log Message:
--- NEW FILE: vo_assetswap.cpp ---
/*
Copyright (C) 2005, 2006 Plamen Neykov
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is free software: you can redistribute it and/or modify it under the
terms of the QuantLib license. You should have received a copy of the
license along with this program; if not, please email qua...@li...
The license is also available online at http://quantlib.org/html/license.html
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the license for more details.
*/
// this file generated automatically by gensrc.py
// editing this file manually is not recommended
#include <qlo/qladdindefines.hpp>
#include <qlo/typefactory.hpp>
#include <qlo/conversions.hpp>
#include <qlo/assetswap.hpp>
#include <qlo/vo_assetswap.hpp>
namespace QuantLibAddin { namespace ValueObjects {
const char* qlAssetSwap::mPropertyNames[] = {
"objectID",
"PayFixed",
"Nominal",
"underlyingBondID",
"bondCleanPrice",
"floatingLegScheduleID",
"indexID",
"floatingLegSpread",
"floatingLegDayCounter",
"termStructureID"};
std::vector<std::string> qlAssetSwap::getPropertyNames() const {
return std::vector<std::string>(
mPropertyNames, mPropertyNames + sizeof(mPropertyNames)/sizeof(const char*));
}
boost::any qlAssetSwap::getProperty(const std::string& name) const {
if(name == "objectID") return objectID_;
else if(name == "PayFixed") return PayFixed_;
else if(name == "Nominal") return Nominal_;
else if(name == "underlyingBondID") return underlyingBondID_;
else if(name == "bondCleanPrice") return bondCleanPrice_;
else if(name == "floatingLegScheduleID") return floatingLegScheduleID_;
else if(name == "indexID") return indexID_;
else if(name == "floatingLegSpread") return floatingLegSpread_;
else if(name == "floatingLegDayCounter") return floatingLegDayCounter_;
else if(name == "termStructureID") return termStructureID_;
else
throw ObjHandler::Exception("Error: attempt to retrieve non-existent Property: '" + name + "'");
return boost::any(); /* Dummy return - just to avoid stupid compiler warnings/errors */
}
qlAssetSwap::qlAssetSwap(
const std::string& objectID,
bool PayFixed,
double Nominal,
const std::string& underlyingBondID,
double bondCleanPrice,
const std::string& floatingLegScheduleID,
const std::string& indexID,
double floatingLegSpread,
const std::string& floatingLegDayCounter,
const std::string& termStructureID) :
objectID_(objectID),
PayFixed_(PayFixed),
Nominal_(Nominal),
underlyingBondID_(underlyingBondID),
bondCleanPrice_(bondCleanPrice),
floatingLegScheduleID_(floatingLegScheduleID),
indexID_(indexID),
floatingLegSpread_(floatingLegSpread),
floatingLegDayCounter_(floatingLegDayCounter),
termStructureID_(termStructureID) {}
} }
--- NEW FILE: vo_assetswap.hpp ---
/*
Copyright (C) 2005, 2006 Plamen Neykov
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is free software: you can redistribute it and/or modify it under the
terms of the QuantLib license. You should have received a copy of the
license along with this program; if not, please email qua...@li...
The license is also available online at http://quantlib.org/html/license.html
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the license for more details.
*/
// this file generated automatically by gensrc.py
// editing this file manually is not recommended
#ifndef qla_vo_assetswap_hpp
#define qla_vo_assetswap_hpp
#include <oh/valueobject.hpp>
#include <string>
#include <vector>
#include <boost/any.hpp>
namespace QuantLibAddin { namespace ValueObjects {
class qlAssetSwap : public ObjHandler::ValueObject {
public:
qlAssetSwap(
const std::string& objectID,
bool PayFixed,
double Nominal,
const std::string& underlyingBondID,
double bondCleanPrice,
const std::string& floatingLegScheduleID,
const std::string& indexID,
double floatingLegSpread,
const std::string& floatingLegDayCounter,
const std::string& termStructureID);
std::vector<std::string> getPropertyNames() const;
boost::any getProperty(const std::string& name) const;
protected:
static const char* mPropertyNames[];
std::string objectID_;
bool PayFixed_;
double Nominal_;
std::string underlyingBondID_;
double bondCleanPrice_;
std::string floatingLegScheduleID_;
std::string indexID_;
double floatingLegSpread_;
std::string floatingLegDayCounter_;
std::string termStructureID_;
};
} }
#endif
|