source: trunk/src/Outputs/ASCIICatalogueWriter.hh

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

Starting to solve #50 - writing a number of classes to implement writing to different annotation files - have defined Karma and DS9 classes. Still to actually implement in the Duchamp code.

File size: 2.7 KB
RevLine 
[1069]1// -----------------------------------------------------------------------
2// ASCIICatalogueWriter.hh: Writing output catalogues to basic ASCII-format
3//                          files (or the screen).
4// -----------------------------------------------------------------------
5// Copyright (C) 2006, Matthew Whiting, ATNF
6//
7// This program is free software; you can redistribute it and/or modify it
8// under the terms of the GNU General Public License as published by the
9// Free Software Foundation; either version 2 of the License, or (at your
10// option) any later version.
11//
12// Duchamp is distributed in the hope that it will be useful, but WITHOUT
13// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15// for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with Duchamp; if not, write to the Free Software Foundation,
19// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
20//
21// Correspondence concerning Duchamp may be directed to:
22//    Internet email: Matthew.Whiting [at] atnf.csiro.au
23//    Postal address: Dr. Matthew Whiting
24//                    Australia Telescope National Facility, CSIRO
25//                    PO Box 76
26//                    Epping NSW 1710
27//                    AUSTRALIA
28// -----------------------------------------------------------------------
[1046]29#ifndef DUCHAMP_ASCII_CATALOGUE_WRITER_H_
30#define DUCHAMP_ASCII_CATALOGUE_WRITER_H_
31
32#include <duchamp/Outputs/CatalogueWriter.hh>
[1071]33#include <duchamp/Outputs/FileCatalogueWriter.hh>
[1061]34#include <duchamp/Outputs/columns.hh>
[1046]35#include <duchamp/Detection/detection.hh>
[1049]36#include <ios>
[1046]37#include <iostream>
[1048]38#include <fstream>
[1046]39
40namespace duchamp {
41
[1071]42  class ASCIICatalogueWriter : public FileCatalogueWriter
[1046]43  {
44  public:
45    ASCIICatalogueWriter();
46    ASCIICatalogueWriter(std::string name);
[1061]47    ASCIICatalogueWriter(Catalogues::DESTINATION dest);
48    ASCIICatalogueWriter(std::string name, Catalogues::DESTINATION dest);
[1046]49    ASCIICatalogueWriter(const ASCIICatalogueWriter& other);
50    ASCIICatalogueWriter& operator= (const ASCIICatalogueWriter& other);
[1048]51    virtual ~ASCIICatalogueWriter(){};
[1046]52   
53    /// @brief open the catalogue for writing
[1049]54    bool openCatalogue(std::ios_base::openmode mode = std::ios_base::out );
[1046]55
56    /// @brief Write header information - not including parameters
57    void writeHeader();
[1049]58    void writeCommandLineEntry(int argc, char *argv[]);
[1046]59
[1048]60    void writeParameters();
61    void writeStats();
[1046]62    void writeTableHeader();
[1048]63    void writeEntry(Detection *object);
[1049]64    void writeCubeSummary();
[1048]65    void writeFooter(){};
[1046]66
67    bool closeCatalogue();
68
[1048]69
[1046]70  protected:
[1048]71    std::ostream *itsStream;
[1061]72    Catalogues::DESTINATION itsDestination;
[1048]73     
[1046]74
75  };
76
77
78}
79
80
81#endif
Note: See TracBrowser for help on using the repository browser.