casa::DS9FileReader Class Reference

Implementation of RSFileReader for DS9 regions. More...

#include <DS9FileReader.h>

Inheritance diagram for casa::DS9FileReader:
casa::RSFileReader casa::RSFileReaderWriter

List of all members.

Public Member Functions

 DS9FileReader ()
 Constructor.
 ~DS9FileReader ()
 Destructor.
bool read (vector< RegionShape * > &shapes)
 RSFileReader methods //.

Private Member Functions

bool processLine (const QString &line, stringstream &invalid)
 Processes the given line and returns whether an error occurred or not.
bool processRegion (QStringList &line, QString &comment, stringstream &invalid, bool include=true)
 Processes the given region and returns whether an error occurred or not.
bool processCoordSys (QString &line, stringstream &invalid)
 Processes the given coordinate system and returns whether an error occurred or not.
bool processGlobal (QString &line, stringstream &invalid)
 Processes the given global line and returns whether an error occurred or not.
bool processComment (DS9Region &region, QString &comment, stringstream &invalid)
 Processes the given comment into properties for the given region, and returns whether an error occurred or not.
bool readPointType (QString &comment, DS9::RegionType &type)
 For "point" regions.
bool readProperties (Record &record, QString &line)
 Reads properties in the given line into the given record.

Private Attributes

pair< DS9::CoordinateSystem, bool > m_nextSystem
 Whether a coordinate system has been set in the file, and what it is.
vector< DS9Regionm_regions
 Read regions.
Record m_globals
 Current read global properties.

Detailed Description

Implementation of RSFileReader for DS9 regions.

Definition at line 649 of file DS9FileReader.h.


Constructor & Destructor Documentation

casa::DS9FileReader::DS9FileReader (  ) 

Constructor.

casa::DS9FileReader::~DS9FileReader (  ) 

Destructor.


Member Function Documentation

bool casa::DS9FileReader::processComment ( DS9Region region,
QString &  comment,
stringstream &  invalid 
) [private]

Processes the given comment into properties for the given region, and returns whether an error occurred or not.

If an error occurred, the details are appended to invalid.

bool casa::DS9FileReader::processCoordSys ( QString &  line,
stringstream &  invalid 
) [private]

Processes the given coordinate system and returns whether an error occurred or not.

If an error occurred, the details are appended to invalid.

bool casa::DS9FileReader::processGlobal ( QString &  line,
stringstream &  invalid 
) [private]

Processes the given global line and returns whether an error occurred or not.

If an error occurred, the details are appended to invalid.

bool casa::DS9FileReader::processLine ( const QString &  line,
stringstream &  invalid 
) [private]

Processes the given line and returns whether an error occurred or not.

If an error occurred, the details are appended to invalid.

bool casa::DS9FileReader::processRegion ( QStringList &  line,
QString &  comment,
stringstream &  invalid,
bool  include = true 
) [private]

Processes the given region and returns whether an error occurred or not.

If an error occurred, the details are appended to invalid. line should contain the comma-, parentheses-, or whitespace-separated text before the comment symbol, while "comment" should contain all text after the comment symbol. The include flag is used to set the include property.

bool casa::DS9FileReader::read ( vector< RegionShape * > &  shapes  )  [virtual]

RSFileReader methods //.

Implements RSFileReader::read.

Implements casa::RSFileReader.

bool casa::DS9FileReader::readPointType ( QString &  comment,
DS9::RegionType type 
) [private]

For "point" regions.

Parses the given comment for a point=type property and places the correct type into "type". Returns whether the operation succeeded or not.

bool casa::DS9FileReader::readProperties ( Record &  record,
QString &  line 
) [private]

Reads properties in the given line into the given record.


Member Data Documentation

Current read global properties.

Definition at line 671 of file DS9FileReader.h.

Whether a coordinate system has been set in the file, and what it is.

Definition at line 665 of file DS9FileReader.h.

Read regions.

Definition at line 668 of file DS9FileReader.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1