Template class
Posted by
simone pilozzi on
URL: http://quantlib.414.s1.nabble.com/Template-class-tp5775.html
Hi all,
I am trying to add some functionality (like download from bloomberg) to the TimeSeries class of QL.
I created an abstract (and template class) class with a pure virtual method BlpDownload to create the timeseries <T> from blp.
The compiler always raises the error c2248:impossible d'accder private membre dclar(e) dans la class.
Here is part of the code (qDate is a typedef for QuantLib::Date)
the abstract class
template
<class T>
class timeseries{
timeseries(){}
inline
timeseries(const timeseries& original){
dates = original.getDates();
data = original.getData();
ts = original.getSeries();
}
inline vector<T>getData()const{return data;}
inline vector<qDate> getDates()const{return dates;}
virtual void blpDownload(string& assetname,vector<string> attributes,shared_ptr<Session> sessionptr)= 0;
protected
:
vector<qDate> dates;
vector<T> data;
TimeSeries<T>* ts;
};
the inherited class
class
financialtimeseries:public timeseries<vector<Real>>{
public:
financialtimeseries(){}
virtual void blpDownload(string& assetname,vector<string> attributes,
shared_ptr<Session> sessionptr);
};
void
financialtimeseries::blpDownload(string& assetname,
vector<string> attributes,shared_ptr<Session> sessionptr){.....blp download}
Any idea? Thanks in advance....
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users