source: trunk/src/Outputs/VOTableCatalogueWriter.hh @ 1066

Last change on this file since 1066 was 1066, checked in by MatthewWhiting, 12 years ago

Cleaning up - removing all the old commented out code. We can also remove entirely the file src/Cubes/VOTable.cc, by incorporating the outputDetectionsVOTable() function to detectionIO.cc

File size: 1.2 KB
Line 
1#ifndef DUCHAMP_VOTABLE_CATALOGUE_WRITER_H_
2#define DUCHAMP_VOTABLE_CATALOGUE_WRITER_H_
3
4#include <duchamp/Outputs/CatalogueWriter.hh>
5#include <duchamp/Detection/detection.hh>
6#include <ios>
7#include <iostream>
8#include <fstream>
9#include <string>
10
11namespace duchamp {
12
13  class VOTableCatalogueWriter : public CatalogueWriter
14  {
15  public:
16    VOTableCatalogueWriter();
17    VOTableCatalogueWriter(std::string name);
18    VOTableCatalogueWriter(const VOTableCatalogueWriter& other);
19    VOTableCatalogueWriter& operator= (const VOTableCatalogueWriter& other);
20    virtual ~VOTableCatalogueWriter(){};
21
22    /// @brief open the catalogue for writing
23    bool openCatalogue(std::ios_base::openmode mode = std::ios_base::out);
24
25    /// @brief Write header information - not including parameters
26    void writeHeader();
27
28    void writeParameters();
29    void writeStats();
30    void writeTableHeader();
31    void writeEntries();
32    void writeEntry(Detection *object);
33
34    void writeFooter();
35
36    bool closeCatalogue();
37
38    void setTableName(std::string s){itsTableName=s;};
39    void setTableDescription(std::string s){itsTableDescription=s;};
40
41  protected:
42    std::ofstream itsFileStream;
43    std::string itsTableName;
44    std::string itsTableDescription;
45  };
46
47}
48
49#endif
Note: See TracBrowser for help on using the repository browser.