cphot 0.1
A C++ tool for computing photometry from spectra.
votable::VOTable Class Reference

Class defining a very simple parser of XML VOTable. More...

#include <votable.hpp>

Public Member Functions

 VOTable ()
 Dummy Constructor. More...
 
 VOTable (const std::string &input_filename)
 Constructor. More...
 
void from_content (const std::string &content)
 Constructor. More...
 
size_t size ()
 Size of the data table. More...
 
size_t n_columns ()
 number of fields More...
 
template<typename T >
VOField< T > get (std::string field_name)
 Retrieve field data. More...
 
template<typename T >
VOField< T > get (size_t field_index)
 Retrieve field data. More...
 

Public Attributes

std::map< std::string, Paramparams
 Table parameters. More...
 
std::vector< Fieldfields
 Table Fields. More...
 

Detailed Description

Class defining a very simple parser of XML VOTable.

This class reads in the XML content assuming a single table was defined. It stores the descriptions into fields and params (attributes of the table) the get methods allows one to rapidly access the data into a non-string type.

Definition at line 162 of file votable.hpp.

Constructor & Destructor Documentation

◆ VOTable() [1/2]

votable::VOTable::VOTable ( )

Dummy Constructor.

Definition at line 190 of file votable.hpp.

◆ VOTable() [2/2]

votable::VOTable::VOTable ( const std::string &  input_filename)

Constructor.

Parameters
input_filenameXML file to parse

Definition at line 197 of file votable.hpp.

Member Function Documentation

◆ from_content()

void votable::VOTable::from_content ( const std::string &  content)

Constructor.

Parameters
contentXML file content to parse

Definition at line 208 of file votable.hpp.

◆ get() [1/2]

template<typename T >
VOField< T > votable::VOTable::get ( size_t  field_index)

Retrieve field data.

Template Parameters
Ttype to parse the data into
Parameters
field_indexindex of the field
Returns
std::vector<T> data vector

Definition at line 352 of file votable.hpp.

◆ get() [2/2]

template<typename T >
VOField< T > votable::VOTable::get ( std::string  field_name)

Retrieve field data.

Template Parameters
Ttype to parse the data into
Parameters
field_namename of the field
Returns
std::vector<T> data vector

Definition at line 330 of file votable.hpp.

◆ n_columns()

size_t votable::VOTable::n_columns ( )

number of fields

Returns
size_t length of the fields

Definition at line 318 of file votable.hpp.

◆ size()

size_t votable::VOTable::size ( )

Size of the data table.

Returns
size_t length of the data

Definition at line 309 of file votable.hpp.

Member Data Documentation

◆ fields

std::vector<Field> votable::VOTable::fields

Table Fields.

Definition at line 166 of file votable.hpp.

◆ params

std::map<std::string, Param> votable::VOTable::params

Table parameters.

Definition at line 165 of file votable.hpp.


The documentation for this class was generated from the following file: