// { dg-do assemble }
|
// { dg-do assemble }
|
// GROUPS passed old-abort
|
// GROUPS passed old-abort
|
class D_Interval;
|
class D_Interval;
|
|
|
class Date
|
class Date
|
{
|
{
|
public:
|
public:
|
Date(const D_Interval*,const Date&);
|
Date(const D_Interval*,const Date&);
|
private:
|
private:
|
const D_Interval* interval;
|
const D_Interval* interval;
|
};
|
};
|
|
|
class Time_Interval
|
class Time_Interval
|
{
|
{
|
public:
|
public:
|
Time_Interval(const Date& start,const Date& stop);
|
Time_Interval(const Date& start,const Date& stop);
|
const Date& Start() const { return start; }
|
const Date& Start() const { return start; }
|
const Date& Stop() const { return stop; }
|
const Date& Stop() const { return stop; }
|
private:
|
private:
|
Date start;
|
Date start;
|
Date stop;
|
Date stop;
|
};
|
};
|
|
|
class Dated_Data
|
class Dated_Data
|
{
|
{
|
public:
|
public:
|
Dated_Data(const Time_Interval& dates);
|
Dated_Data(const Time_Interval& dates);
|
virtual ~Dated_Data();
|
virtual ~Dated_Data();
|
Time_Interval Dates() const { return dates; }
|
Time_Interval Dates() const { return dates; }
|
private:
|
private:
|
Time_Interval dates;
|
Time_Interval dates;
|
};
|
};
|
|
|
class Raw_Data : public Dated_Data
|
class Raw_Data : public Dated_Data
|
{
|
{
|
public:
|
public:
|
Raw_Data(const Dated_Data *source,const D_Interval& period);
|
Raw_Data(const Dated_Data *source,const D_Interval& period);
|
};
|
};
|
|
|
Raw_Data::Raw_Data(const Dated_Data *source,const D_Interval& period)
|
Raw_Data::Raw_Data(const Dated_Data *source,const D_Interval& period)
|
: Dated_Data(Time_Interval(Date(&period,source->Dates().Start()),
|
: Dated_Data(Time_Interval(Date(&period,source->Dates().Start()),
|
Date(&period,source->Dates().Stop())))
|
Date(&period,source->Dates().Stop())))
|
{
|
{
|
}
|
}
|
|
|