LCOV - code coverage report
Current view: top level - imageanalysis/IO - AsciiAnnotationFileLine.h (source / functions) Hit Total Coverage
Test: casa_coverage.info Lines: 0 2 0.0 %
Date: 2023-10-25 08:47:59 Functions: 0 1 0.0 %

          Line data    Source code
       1             : //# AsciiRegionLine.h
       2             : //# Copyright (C) 1998,1999,2000,2001
       3             : //# Associated Universities, Inc. Washington DC, USA.
       4             : //#
       5             : //# This library is free software; you can redistribute it and/or modify it
       6             : //# under the terms of the GNU Library General Public License as published by
       7             : //# the Free Software Foundation; either version 2 of the License, or (at your
       8             : //# option) any later version.
       9             : //#
      10             : //# This library is distributed in the hope that it will be useful, but WITHOUT
      11             : //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      12             : //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
      13             : //# License for more details.
      14             : //#
      15             : //# You should have received a copy of the GNU Library General Public License
      16             : //# along with this library; if not, write to the Free Software Foundation,
      17             : //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
      18             : //#
      19             : //# Correspondence concerning AIPS++ should be addressed as follows:
      20             : //#        Internet email: aips2-request@nrao.edu.
      21             : //#        Postal address: AIPS++ Project Office
      22             : //#                        National Radio Astronomy Observatory
      23             : //#                        520 Edgemont Road
      24             : //#                        Charlottesville, VA 22903-2475 USA
      25             : //#
      26             : 
      27             : 
      28             : #ifndef IMAGES_ASCIIANNOTATIONFILELINE_H
      29             : #define IMAGES_ASCIIANNOTATIONFILELINE_H
      30             : 
      31             : #include <casacore/casa/aips.h>
      32             : #include <imageanalysis/Annotations/AnnotationBase.h>
      33             : #include <casacore/measures/Measures/Stokes.h>
      34             : 
      35             : namespace casa {
      36             : 
      37             : // <summary>
      38             : // Represents a line in an ascii region file
      39             : // </summary>
      40             : // <author>Dave Mehringer</author>
      41             : // <use visibility=export>
      42             : // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
      43             : // </reviewed>
      44             : // <prerequisite>
      45             : 
      46             : // </prerequisite>
      47             : 
      48             : // <etymology>
      49             : // Represents a line in an ascii region file
      50             : // </etymology>
      51             : 
      52             : // <synopsis>
      53             : // Represents a line in an ascii region file
      54             : // See the region file format proposal attached to CAS-2285 (https://bugs.nrao.edu/browse/CAS-2285)
      55             : // </synopsis>
      56             : 
      57             : class AsciiAnnotationFileLine {
      58             : 
      59             : public:
      60             : 
      61             :         enum Type {
      62             :                 ANNOTATION,
      63             :                 COMMENT,
      64             :                 GLOBAL,
      65             :                 UNKNOWN_TYPE
      66             :         };
      67             : 
      68             :         AsciiAnnotationFileLine();
      69             : 
      70             :         AsciiAnnotationFileLine(const casacore::String& comment);
      71             : 
      72             :         AsciiAnnotationFileLine(casacore::CountedPtr<const AnnotationBase> annotationBase);
      73             : 
      74             :         AsciiAnnotationFileLine(const std::map<AnnotationBase::Keyword, casacore::String>& globals);
      75             : 
      76             :         AsciiAnnotationFileLine& operator= (const AsciiAnnotationFileLine& other);
      77             : 
      78             :         casacore::String getComment() const;
      79             : 
      80             :         std::map<AnnotationBase::Keyword, casacore::String> getGloabalParams() const;
      81             : 
      82             :         casacore::CountedPtr<const AnnotationBase> getAnnotationBase() const;
      83             : 
      84             :         Type getType() const;
      85             : 
      86             :         std::ostream& print(std::ostream& os) const;
      87             : 
      88             : private:
      89             :         Type _type;
      90             :         casacore::String _comment;
      91             :         casacore::CountedPtr<const AnnotationBase> _annotationBase;
      92             :         std::map<AnnotationBase::Keyword, casacore::String> _globals;
      93             : 
      94             : };
      95             : 
      96           0 : inline std::ostream &operator<<(std::ostream& os, const AsciiAnnotationFileLine& line) {
      97           0 :         return line.print(os);
      98             : };
      99             : 
     100             : }
     101             : 
     102             : #endif /* ASCIIREGIONLINE_H */

Generated by: LCOV version 1.16