casa
$Rev:20696$
|
Implementation of RSFileReader for DS9 regions. More...
#include <DS9FileReader.h>
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 ®ion, 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< DS9Region > | m_regions |
Read regions. | |
Record | m_globals |
Current read global properties. |
Implementation of RSFileReader for DS9 regions.
Definition at line 591 of file DS9FileReader.h.
Constructor.
Destructor.
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] |
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.
Record casa::DS9FileReader::m_globals [private] |
Current read global properties.
Definition at line 613 of file DS9FileReader.h.
pair<DS9::CoordinateSystem, bool> casa::DS9FileReader::m_nextSystem [private] |
Whether a coordinate system has been set in the file, and what it is.
Definition at line 607 of file DS9FileReader.h.
vector<DS9Region> casa::DS9FileReader::m_regions [private] |
Read regions.
Definition at line 610 of file DS9FileReader.h.