GammaLib 2.0.0
Loading...
Searching...
No Matches
GVOTable.hpp
Go to the documentation of this file.
1/***************************************************************************
2 * GVOTable.hpp - VO table class *
3 * ----------------------------------------------------------------------- *
4 * copyright (C) 2014-2016 by Thierry Louge *
5 * ----------------------------------------------------------------------- *
6 * *
7 * This program is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * This program is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU General Public License *
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
19 * *
20 ***************************************************************************/
21/**
22 * @file GVOTable.hpp
23 * @brief VO table class definition
24 * @author Thierry Louge
25 */
26
27#ifndef GVOTable_HPP
28#define GVOTable_HPP
29
30/* __ Definitions ________________________________________________________ */
31
32/* __ Includes ___________________________________________________________ */
33#include <string>
34#include "GBase.hpp"
35#include "GXml.hpp"
36
37/* __ Forward declarations _______________________________________________ */
38class GFitsTable;
39class GFitsTableCol;
40class GXmlElement;
41
42
43/***********************************************************************//**
44 * @class GVOTable
45 *
46 * @brief VOTable class
47 *
48 * This class implements a VOTable for exchanges through VO-compatible
49 * applications. The class implements IVOA standard Recommendation 2013-09-20
50 * VOTable1.3.
51 *
52 * See
53 * http://www.ivoa.net/documents/VOTable/20130920/REC-VOTable-1.3-20130920.pdf
54 ***************************************************************************/
55class GVOTable : public GBase {
56
57public:
58 // Constructors and destructors
59 GVOTable(void);
60 explicit GVOTable(const GFitsTable& table);
61 GVOTable(const GVOTable& votable);
62 virtual ~GVOTable(void);
63
64 // Operators
65 GVOTable& operator=(const GVOTable& votable);
66
67 // Methods
68 void clear(void);
69 GVOTable* clone(void) const;
70 std::string classname(void) const;
71 void read(const GFitsTable& table);
72 const GXml& xml(void) const;
73 const std::string& name(void) const;
74 std::string print(const GChatter& chatter = NORMAL) const;
75
76protected:
77 // Protected methods
78 void init_members(void);
79 void copy_members(const GVOTable& table);
80 void free_members(void);
83
84 // Protected members
85 GXml m_xml; //!< VO table
86 std::string m_name; //!< VO table name
87 std::string m_resource; //!< VO resource name
88 std::string m_description; //!< VO table description
89};
90
91
92/***********************************************************************//**
93 * @brief Return class name
94 *
95 * @return String containing the class name ("GVOTable").
96 ***************************************************************************/
97inline
98std::string GVOTable::classname(void) const
99{
100 return ("GVOTable");
101}
102
103
104/***********************************************************************//**
105 * @brief Return VO table XML file
106 *
107 * @return VO table XML file.
108 ***************************************************************************/
109inline
110const GXml& GVOTable::xml(void) const
111{
112 return (m_xml);
113}
114
115
116/***********************************************************************//**
117 * @brief Return VO table name
118 *
119 * @return VO table name string.
120 ***************************************************************************/
121inline
122const std::string& GVOTable::name(void) const
123{
124 return (m_name);
125}
126
127#endif /* GVOTable_HPP */
Definition of interface for all GammaLib classes.
GChatter
Definition GTypemaps.hpp:33
@ NORMAL
Definition GTypemaps.hpp:36
XML class interface definition.
Interface class for all GammaLib classes.
Definition GBase.hpp:52
Abstract interface for FITS table column.
Abstract interface for FITS table.
VOTable class.
Definition GVOTable.hpp:55
std::string print(const GChatter &chatter=NORMAL) const
Print VO Table information.
Definition GVOTable.cpp:227
GVOTable & operator=(const GVOTable &votable)
Assignment operator.
Definition GVOTable.cpp:126
std::string classname(void) const
Return class name.
Definition GVOTable.hpp:98
virtual ~GVOTable(void)
Destructor.
Definition GVOTable.cpp:104
const GXml & xml(void) const
Return VO table XML file.
Definition GVOTable.hpp:110
GXmlElement field_from_fits_column(const GFitsTableCol &column) const
Return FIELD element with column description.
Definition GVOTable.cpp:302
GXml m_xml
VO table.
Definition GVOTable.hpp:85
GVOTable * clone(void) const
Clone object.
Definition GVOTable.cpp:174
GVOTable(void)
Void constructor.
Definition GVOTable.cpp:55
void free_members(void)
Delete class members.
Definition GVOTable.cpp:289
std::string m_description
VO table description.
Definition GVOTable.hpp:88
void init_members(void)
Initialise class members.
Definition GVOTable.cpp:255
void clear(void)
Clear object.
Definition GVOTable.cpp:158
void copy_members(const GVOTable &table)
Copy class members.
Definition GVOTable.cpp:273
std::string m_name
VO table name.
Definition GVOTable.hpp:86
void read(const GFitsTable &table)
Read VO table from FITS table.
Definition GVOTable.cpp:184
std::string m_resource
VO resource name.
Definition GVOTable.hpp:87
const std::string & name(void) const
Return VO table name.
Definition GVOTable.hpp:122
GXmlElement data_from_fits_table(const GFitsTable &table) const
Return DATA element with FITS table data.
Definition GVOTable.cpp:370
XML element node class.
XML class.
Definition GXml.hpp:172