Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25385/qlo
Added Files:
vo_generalstatistics.cpp vo_generalstatistics.hpp
vo_incrementalstatistics.cpp vo_incrementalstatistics.hpp
Log Message:
--- NEW FILE: vo_incrementalstatistics.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/incrementalstatistics.hpp>
#include <qlo/vo_incrementalstatistics.hpp>
namespace QuantLibAddin { namespace ValueObjects {
const char* qlIncrementalStatistics::mPropertyNames[] = {
"objectID",
"values",
"weights"};
std::vector<std::string> qlIncrementalStatistics::getPropertyNames() const {
return std::vector<std::string>(
mPropertyNames, mPropertyNames + sizeof(mPropertyNames)/sizeof(const char*));
}
boost::any qlIncrementalStatistics::getProperty(const std::string& name) const {
if(name == "objectID") return objectID_;
else if(name == "values") return values_;
else if(name == "weights") return weights_;
else
throw ObjHandler::Exception("Error: attempt to retrieve non-existent Property: '" + name + "'");
return boost::any(); /* Dummy return - just to avoid stupid compiler warnings/errors */
}
qlIncrementalStatistics::qlIncrementalStatistics(
const std::string& objectID,
const std::vector<double>& values,
const std::vector<double>& weights) :
objectID_(objectID),
values_(values),
weights_(weights) {}
const char* qlIncrementalStatistics2::mPropertyNames[] = {
"objectID"};
std::vector<std::string> qlIncrementalStatistics2::getPropertyNames() const {
return std::vector<std::string>(
mPropertyNames, mPropertyNames + sizeof(mPropertyNames)/sizeof(const char*));
}
boost::any qlIncrementalStatistics2::getProperty(const std::string& name) const {
if(name == "objectID") return objectID_;
else
throw ObjHandler::Exception("Error: attempt to retrieve non-existent Property: '" + name + "'");
return boost::any(); /* Dummy return - just to avoid stupid compiler warnings/errors */
}
qlIncrementalStatistics2::qlIncrementalStatistics2(
const std::string& objectID) :
objectID_(objectID) {}
} }
--- NEW FILE: vo_incrementalstatistics.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_incrementalstatistics_hpp
#define qla_vo_incrementalstatistics_hpp
#include <oh/valueobject.hpp>
#include <string>
#include <vector>
#include <boost/any.hpp>
namespace QuantLibAddin { namespace ValueObjects {
class qlIncrementalStatistics : public ObjHandler::ValueObject {
public:
qlIncrementalStatistics(
const std::string& objectID,
const std::vector<double>& values,
const std::vector<double>& weights);
std::vector<std::string> getPropertyNames() const;
boost::any getProperty(const std::string& name) const;
protected:
static const char* mPropertyNames[];
std::string objectID_;
std::vector<double> values_;
std::vector<double> weights_;
};
class qlIncrementalStatistics2 : public ObjHandler::ValueObject {
public:
qlIncrementalStatistics2(
const std::string& objectID);
std::vector<std::string> getPropertyNames() const;
boost::any getProperty(const std::string& name) const;
protected:
static const char* mPropertyNames[];
std::string objectID_;
};
} }
#endif
--- NEW FILE: vo_generalstatistics.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/generalstatistics.hpp>
#include <qlo/vo_generalstatistics.hpp>
namespace QuantLibAddin { namespace ValueObjects {
const char* qlGeneralStatistics::mPropertyNames[] = {
"objectID",
"values",
"weights"};
std::vector<std::string> qlGeneralStatistics::getPropertyNames() const {
return std::vector<std::string>(
mPropertyNames, mPropertyNames + sizeof(mPropertyNames)/sizeof(const char*));
}
boost::any qlGeneralStatistics::getProperty(const std::string& name) const {
if(name == "objectID") return objectID_;
else if(name == "values") return values_;
else if(name == "weights") return weights_;
else
throw ObjHandler::Exception("Error: attempt to retrieve non-existent Property: '" + name + "'");
return boost::any(); /* Dummy return - just to avoid stupid compiler warnings/errors */
}
qlGeneralStatistics::qlGeneralStatistics(
const std::string& objectID,
const std::vector<double>& values,
const std::vector<double>& weights) :
objectID_(objectID),
values_(values),
weights_(weights) {}
const char* qlGeneralStatistics2::mPropertyNames[] = {
"objectID"};
std::vector<std::string> qlGeneralStatistics2::getPropertyNames() const {
return std::vector<std::string>(
mPropertyNames, mPropertyNames + sizeof(mPropertyNames)/sizeof(const char*));
}
boost::any qlGeneralStatistics2::getProperty(const std::string& name) const {
if(name == "objectID") return objectID_;
else
throw ObjHandler::Exception("Error: attempt to retrieve non-existent Property: '" + name + "'");
return boost::any(); /* Dummy return - just to avoid stupid compiler warnings/errors */
}
qlGeneralStatistics2::qlGeneralStatistics2(
const std::string& objectID) :
objectID_(objectID) {}
} }
--- NEW FILE: vo_generalstatistics.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_generalstatistics_hpp
#define qla_vo_generalstatistics_hpp
#include <oh/valueobject.hpp>
#include <string>
#include <vector>
#include <boost/any.hpp>
namespace QuantLibAddin { namespace ValueObjects {
class qlGeneralStatistics : public ObjHandler::ValueObject {
public:
qlGeneralStatistics(
const std::string& objectID,
const std::vector<double>& values,
const std::vector<double>& weights);
std::vector<std::string> getPropertyNames() const;
boost::any getProperty(const std::string& name) const;
protected:
static const char* mPropertyNames[];
std::string objectID_;
std::vector<double> values_;
std::vector<double> weights_;
};
class qlGeneralStatistics2 : public ObjHandler::ValueObject {
public:
qlGeneralStatistics2(
const std::string& objectID);
std::vector<std::string> getPropertyNames() const;
boost::any getProperty(const std::string& name) const;
protected:
static const char* mPropertyNames[];
std::string objectID_;
};
} }
#endif
|