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

Superclass for readers and writers containing common definitions and operations. More...

#include <RSFileReaderWriter.h>

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

Public Types

enum  SupportedType {
  DS9,
  CASA_XML
}
 Public Static Methods //. More...
 

Public Member Functions

 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...
 

Static Public Member Functions

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

virtual void setError (const casacore::String &error, bool isFatal=false) const
 Convenience method for setting last error during read/write. More...
 

Protected Attributes

casacore::String m_filename
 Filename to be read/written. More...
 
RFError m_lastError
 Last error seen during read/write. More...
 

Detailed Description

Superclass for readers and writers containing common definitions and operations.

Definition at line 78 of file RSFileReaderWriter.h.

Member Enumeration Documentation

Public Static Methods //.

An enum of all known subclasses/formats supported.

Enumerator
DS9 
CASA_XML 

Definition at line 83 of file RSFileReaderWriter.h.

Constructor & Destructor Documentation

casa::RSFileReaderWriter::RSFileReaderWriter ( )
inline

Non-Static Members //.

Constructor.

Definition at line 118 of file RSFileReaderWriter.h.

virtual casa::RSFileReaderWriter::~RSFileReaderWriter ( )
inlinevirtual

Destructor.

Definition at line 121 of file RSFileReaderWriter.h.

Member Function Documentation

static casacore::String casa::RSFileReaderWriter::extensionForType ( SupportedType  type)
static

Returns the file extension for the given SupportedType.

virtual const RFError& casa::RSFileReaderWriter::lastError ( ) const
virtual

Returns the last error set during read/write.

static QWidget* casa::RSFileReaderWriter::optionsWidgetForType ( SupportedType  type)
static

Returns an new appropriate options widget for the given SupportedType, or NULL for an error (shouldn't happen).

static RSFileReader* casa::RSFileReaderWriter::readerForType ( SupportedType  type)
static

Returns an appropriate child RegionFileReader class for the given SupportedType, or NULL for an error (shouldn't happen).

virtual void casa::RSFileReaderWriter::setError ( const casacore::String error,
bool  isFatal = false 
) const
protectedvirtual

Convenience method for setting last error during read/write.

virtual void casa::RSFileReaderWriter::setFile ( const casacore::String filename)
virtual

Sets the file to be read/written to the given.

static SupportedType casa::RSFileReaderWriter::supportedType ( casacore::String  type)
static

Converts between enum and casacore::String for SupportedType.

static casacore::String casa::RSFileReaderWriter::supportedType ( SupportedType  type)
static
static std::vector<SupportedType> casa::RSFileReaderWriter::supportedTypes ( )
static

Returns all known SupportedTypes.

static std::vector<casacore::String> casa::RSFileReaderWriter::supportedTypesStrings ( )
static
static RSFileWriter* casa::RSFileReaderWriter::writerForType ( SupportedType  type)
static

Returns an new appropriate child RegionFileWriter class for the given SupportedType, or NULL for an error (shouldn't happen).

Member Data Documentation

casacore::String casa::RSFileReaderWriter::m_filename
protected

Filename to be read/written.

Definition at line 131 of file RSFileReaderWriter.h.

RFError casa::RSFileReaderWriter::m_lastError
protected

Last error seen during read/write.

Definition at line 134 of file RSFileReaderWriter.h.


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