Alexandria  2.19
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Pdf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2021 Euclid Science Ground Segment
3  *
4  * This library is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU Lesser General Public License as published by the Free
6  * Software Foundation; either version 3.0 of the License, or (at your option)
7  * any later version.
8  *
9  * This library is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12  * details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this library; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 /*
20  * Copyright (C) 2012-2021 Euclid Science Ground Segment
21  *
22  * This library is free software; you can redistribute it and/or modify it under
23  * the terms of the GNU Lesser General Public License as published by the Free
24  * Software Foundation; either version 3.0 of the License, or (at your option)
25  * any later version.
26  *
27  * This library is distributed in the hope that it will be useful, but WITHOUT
28  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
29  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
30  * details.
31  *
32  * You should have received a copy of the GNU Lesser General Public License
33  * along with this library; if not, write to the Free Software Foundation, Inc.,
34  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
35  */
36 
37 /*
38  * @file Pdf.h
39  * @author nikoapos
40  */
41 
42 #ifndef SOURCE_CATALOG_PDF_H
43 #define SOURCE_CATALOG_PDF_H
44 
47 #include <map>
48 #include <string>
49 #include <vector>
50 
51 namespace Euclid {
52 namespace SourceCatalog {
53 
54 template <typename T>
55 class Pdf : public Attribute {
56 
57 public:
59 
60  explicit Pdf(std::map<std::string, PdfType> pdfs) : m_pdfs(std::move(pdfs)) {}
61 
62  virtual ~Pdf() = default;
63 
64  const PdfType& getPdf(const std::string& name) {
65  return m_pdfs.at(name);
66  }
67 
68 private:
70 };
71 
72 } // namespace SourceCatalog
73 } // namespace Euclid
74 
75 #endif /* SOURCE_CATALOG_PDF_H */
virtual ~Pdf()=default
Pdf(std::map< std::string, PdfType > pdfs)
Definition: Pdf.h:60
Attribute interface extended by all source attributes.
Definition: Attribute.h:41
Representation of a multi-dimensional grid which contains axis information.
Definition: GridContainer.h:97
STL class.
STL class.
const PdfType & getPdf(const std::string &name)
Definition: Pdf.h:64
std::map< std::string, PdfType > m_pdfs
Definition: Pdf.h:69