casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
casa::XMLFileReaderWriter Class Reference

Implementation of RegionFileReader/RegionFileWriter for reading/writing CASA-XML files. More...

#include <XMLFileReaderWriter.h>

Inheritance diagram for casa::XMLFileReaderWriter:
casa::RSFileReader casa::RSFileWriter casa::RSFileReaderWriter casa::RSFileReaderWriter

Public Member Functions

 XMLFileReaderWriter ()
 Non-Static Members //. More...
 
 ~XMLFileReaderWriter ()
 Destructor. More...
 
bool read (std::vector< RegionShape * > &shapes)
 RSFileReader methods //. More...
 
QWidget * optionsWidget () const
 RSFileWriter methods //. More...
 
void setOptions (const QWidget *widget)
 Implements RSFileWriter::setOptions. More...
 
bool write (const std::vector< RegionShape * > &shapes) const
 Implements RSFileWriter::write. More...
 
- Public Member Functions inherited from casa::RSFileReader
 RSFileReader ()
 Constructor. More...
 
virtual ~RSFileReader ()
 Destructor. More...
 
virtual bool readFile (const casacore::String &file, std::vector< RegionShape * > &shapes)
 Calls setFile() then read(). More...
 
- Public Member Functions inherited from casa::RSFileReaderWriter
 RSFileReaderWriter ()
 Non-Static Members //. More...
 
virtual ~RSFileReaderWriter ()
 Destructor. More...
 
virtual void setFile (const casacore::String &filename)
 Sets the file to be read/written to the given. More...
 
virtual const RFErrorlastError () const
 Returns the last error set during read/write. More...
 
- Public Member Functions inherited from casa::RSFileWriter
 RSFileWriter ()
 Constructor. More...
 
virtual ~RSFileWriter ()
 Destructor. More...
 
virtual bool writeFile (const casacore::String &filename, const std::vector< RegionShape * > &shapes)
 Calls setFile then write. More...
 

Static Public Member Functions

static std::vector< RegionShape * > DOMToShapes (QDomElement &element)
 Static Members //. More...
 
static QDomElement shapesToDOM (QDomDocument &document, const std::vector< RegionShape * > &shapes)
 Returns a QDomElement that represents the given shapes. More...
 
- Static Public Member Functions inherited from casa::RSFileReaderWriter
static SupportedType supportedType (casacore::String type)
 Converts between enum and casacore::String for SupportedType. More...
 
static casacore::String supportedType (SupportedType type)
 
static casacore::String extensionForType (SupportedType type)
 Returns the file extension for the given SupportedType. More...
 
static std::vector< SupportedTypesupportedTypes ()
 Returns all known SupportedTypes. More...
 
static std::vector
< casacore::String
supportedTypesStrings ()
 
static RSFileReaderreaderForType (SupportedType type)
 Returns an appropriate child RegionFileReader class for the given SupportedType, or NULL for an error (shouldn't happen). More...
 
static RSFileWriterwriterForType (SupportedType type)
 Returns an new appropriate child RegionFileWriter class for the given SupportedType, or NULL for an error (shouldn't happen). More...
 
static QWidget * optionsWidgetForType (SupportedType type)
 Returns an new appropriate options widget for the given SupportedType, or NULL for an error (shouldn't happen). More...
 

Static Public Attributes

static const QString DOCROOT_NAME
 XML file constants. More...
 
static const pair< QString,
QString > 
VERSION
 
static const QString SHAPE_OPTIONS
 
static const QString SHAPE
 

Additional Inherited Members

- Public Types inherited from casa::RSFileReaderWriter
enum  SupportedType {
  DS9,
  CASA_XML
}
 Public Static Methods //. More...
 
- Protected Member Functions inherited from casa::RSFileReaderWriter
virtual void setError (const casacore::String &error, bool isFatal=false) const
 Convenience method for setting last error during read/write. More...
 
- Protected Attributes inherited from casa::RSFileReaderWriter
casacore::String m_filename
 Filename to be read/written. More...
 
RFError m_lastError
 Last error seen during read/write. More...
 

Detailed Description

Implementation of RegionFileReader/RegionFileWriter for reading/writing CASA-XML files.

Definition at line 72 of file XMLFileReaderWriter.h.

Constructor & Destructor Documentation

casa::XMLFileReaderWriter::XMLFileReaderWriter ( )

Non-Static Members //.

Constructor.

casa::XMLFileReaderWriter::~XMLFileReaderWriter ( )

Destructor.

Member Function Documentation

static std::vector<RegionShape*> casa::XMLFileReaderWriter::DOMToShapes ( QDomElement &  element)
static

Static Members //.

Returns the shapes represented by the given QDomElement. The top-level element MUST have tag name SHAPE_OPTIONS, and will have zero or more children elements, each representing a RegionShape, with tag name SHAPE.

QWidget* casa::XMLFileReaderWriter::optionsWidget ( ) const
virtual

RSFileWriter methods //.

Implements RSFileWriter::optionsWidget.

Implements casa::RSFileWriter.

bool casa::XMLFileReaderWriter::read ( std::vector< RegionShape * > &  shapes)
virtual

RSFileReader methods //.

Implements RSFileReader::read.

Implements casa::RSFileReader.

void casa::XMLFileReaderWriter::setOptions ( const QWidget *  widget)
virtual
static QDomElement casa::XMLFileReaderWriter::shapesToDOM ( QDomDocument &  document,
const std::vector< RegionShape * > &  shapes 
)
static

Returns a QDomElement that represents the given shapes.

The top-level element will have tag name SHAPE_OPTIONS, and will have zero or more children elements, each representing a RegionShape, with tag name SHAPE. The given document is used to create the element, but the element is NOT added to the document.

bool casa::XMLFileReaderWriter::write ( const std::vector< RegionShape * > &  shapes) const
virtual

Implements RSFileWriter::write.

Implements casa::RSFileWriter.

Member Data Documentation

const QString casa::XMLFileReaderWriter::DOCROOT_NAME
static

XML file constants.

Definition at line 92 of file XMLFileReaderWriter.h.

const QString casa::XMLFileReaderWriter::SHAPE
static

Definition at line 95 of file XMLFileReaderWriter.h.

const QString casa::XMLFileReaderWriter::SHAPE_OPTIONS
static

Definition at line 94 of file XMLFileReaderWriter.h.

const pair<QString, QString> casa::XMLFileReaderWriter::VERSION
static

Definition at line 93 of file XMLFileReaderWriter.h.


The documentation for this class was generated from the following file: