source: trunk/src/Outputs/ASCIICatalogueWriter.hh @ 1070

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

Adding the licensing text to files that didn't have it.

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>
[1061]33#include <duchamp/Outputs/columns.hh>
[1046]34#include <duchamp/Detection/detection.hh>
[1049]35#include <ios>
[1046]36#include <iostream>
[1048]37#include <fstream>
[1046]38
39namespace duchamp {
40
41  class ASCIICatalogueWriter : public CatalogueWriter
42  {
43  public:
44    ASCIICatalogueWriter();
45    ASCIICatalogueWriter(std::string name);
[1061]46    ASCIICatalogueWriter(Catalogues::DESTINATION dest);
47    ASCIICatalogueWriter(std::string name, Catalogues::DESTINATION dest);
[1046]48    ASCIICatalogueWriter(const ASCIICatalogueWriter& other);
49    ASCIICatalogueWriter& operator= (const ASCIICatalogueWriter& other);
[1048]50    virtual ~ASCIICatalogueWriter(){};
[1046]51   
52    /// @brief open the catalogue for writing
[1049]53    bool openCatalogue(std::ios_base::openmode mode = std::ios_base::out );
[1046]54
55    /// @brief Write header information - not including parameters
56    void writeHeader();
[1049]57    void writeCommandLineEntry(int argc, char *argv[]);
[1046]58
[1048]59    void writeParameters();
60    void writeStats();
[1046]61    void writeTableHeader();
[1048]62    void writeEntries();
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;
[1049]72    std::ofstream itsFileStream;
[1061]73    Catalogues::DESTINATION itsDestination;
[1048]74     
[1046]75
76  };
77
78
79}
80
81
82#endif
Note: See TracBrowser for help on using the repository browser.