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

Abstract superclass for any class that writes RegionShapes to a region file format. More...

#include <RSFileReaderWriter.h>

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

Public Member Functions

 RSFileWriter ()
 Constructor. More...
 
virtual ~RSFileWriter ()
 Destructor. More...
 
virtual QWidget * optionsWidget () const =0
 Provides a custom widget that can be used to get/set options specific to each format type. More...
 
virtual void setOptions (const QWidget *widget)=0
 Sets the options to the values given in the widget. More...
 
virtual bool write (const std::vector< RegionShape * > &shapes) const =0
 Write the given regions to the filename set with setFile and returns true if no errors were reported, false otherwise. More...
 
virtual bool writeFile (const casacore::String &filename, const std::vector< RegionShape * > &shapes)
 Calls setFile then write. 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...
 

Additional Inherited Members

- Public Types inherited from casa::RSFileReaderWriter
enum  SupportedType {
  DS9,
  CASA_XML
}
 Public Static Methods //. 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...
 
- 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

Abstract superclass for any class that writes RegionShapes to a region file format.

Definition at line 167 of file RSFileReaderWriter.h.

Constructor & Destructor Documentation

casa::RSFileWriter::RSFileWriter ( )
inline

Constructor.

Definition at line 170 of file RSFileReaderWriter.h.

virtual casa::RSFileWriter::~RSFileWriter ( )
inlinevirtual

Destructor.

Definition at line 173 of file RSFileReaderWriter.h.

Member Function Documentation

virtual QWidget* casa::RSFileWriter::optionsWidget ( ) const
pure virtual

Provides a custom widget that can be used to get/set options specific to each format type.

Implemented in casa::XMLFileReaderWriter.

virtual void casa::RSFileWriter::setOptions ( const QWidget *  widget)
pure virtual

Sets the options to the values given in the widget.

May ignore invalid widgets (i.e., widgets different from the kind provided by optionsWidget()).

Implemented in casa::XMLFileReaderWriter.

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

Write the given regions to the filename set with setFile and returns true if no errors were reported, false otherwise.

If false is returned, the details can be found using lastError().

Implemented in casa::XMLFileReaderWriter.

virtual bool casa::RSFileWriter::writeFile ( const casacore::String filename,
const std::vector< RegionShape * > &  shapes 
)
inlinevirtual

Calls setFile then write.

Definition at line 190 of file RSFileReaderWriter.h.

References write().


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