-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDF_ProjReport_Collection.cpp
75 lines (68 loc) · 2.55 KB
/
DF_ProjReport_Collection.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//-*- mode:C++ ; c-basic-offset: 2 -*-
// DFLib: A library of Bearings Only Target Localization algorithms
// Copyright (C) 2009-2015 Thomas V. Russo
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// 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
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// Filename : $RCSfile$
//
// Purpose : A subclass of DFLib::ReportCollection in which we make
// the explicit requirement that all reports are
// DFLib::Proj::Report.
//
// Special Notes : In some of my GUI work on qDF I found that the lax
// assumptions by DFLib::ReportCollection (i.e. that
// any implementation of DFLib::Abstract::Report could be
// included in the report) made for some problems. Having
// a class where we could be *sure* every report in the class
// was of the same type was useful. Thus, this subclass that
// merely wraps the other with calls that specify a concrete
// class as acceptable arguments rather than an abstract one.
//
// Creator :
//
// Creation Date :
//
// Revision Information:
// ---------------------
//
// Revision Number: $Revision$
//
// Revision Date : $Date$
//
// Current Owner : $Author$
//-------------------------------------------------------------------------
#ifdef _MSC_VER
#define _USE_MATH_DEFINES
#endif
#include <iostream>
#include <cmath>
#include "DF_Proj_Point.hpp"
#include "DF_Proj_Report.hpp"
#include "DF_ProjReport_Collection.hpp"
namespace DFLib
{
ProjReportCollection::ProjReportCollection()
: ReportCollection()
{
}
ProjReportCollection::~ProjReportCollection()
{
}
int ProjReportCollection::addReport(DFLib::Proj::Report * aReport)
{
return (DFLib::ReportCollection::addReport(dynamic_cast<DFLib::Abstract::Report *>(aReport)));
}
}