casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
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

List of all members.

Public Types

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

Public Member Functions

 RSFileReaderWriter ()
 Non-Static Members //.
virtual ~RSFileReaderWriter ()
 Destructor.
virtual void setFile (const String &filename)
 Sets the file to be read/written to the given.
virtual const RFErrorlastError () const
 Returns the last error set during read/write.

Static Public Member Functions

static SupportedType supportedType (String type)
 Converts between enum and String for SupportedType.
static String supportedType (SupportedType type)
static String extensionForType (SupportedType type)
 Returns the file extension for the given SupportedType.
static vector< SupportedTypesupportedTypes ()
 Returns all known SupportedTypes.
static vector< StringsupportedTypesStrings ()
static RSFileReaderreaderForType (SupportedType type)
 Returns an appropriate child RegionFileReader class for the given SupportedType, or NULL for an error (shouldn't happen).
static RSFileWriterwriterForType (SupportedType type)
 Returns an new appropriate child RegionFileWriter class for the given SupportedType, or NULL for an error (shouldn't happen).
static QWidget * optionsWidgetForType (SupportedType type)
 Returns an new appropriate options widget for the given SupportedType, or NULL for an error (shouldn't happen).

Protected Member Functions

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

Protected Attributes

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

Detailed Description

Superclass for readers and writers containing common definitions and operations.

Definition at line 77 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 82 of file RSFileReaderWriter.h.


Constructor & Destructor Documentation

Non-Static Members //.

Constructor.

Definition at line 117 of file RSFileReaderWriter.h.

virtual casa::RSFileReaderWriter::~RSFileReaderWriter ( ) [inline, virtual]

Destructor.

Definition at line 120 of file RSFileReaderWriter.h.


Member Function Documentation

Returns the file extension for the given SupportedType.

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

Returns the last error set during read/write.

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

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

virtual void casa::RSFileReaderWriter::setError ( const String error,
bool  isFatal = false 
) const [protected, virtual]

Convenience method for setting last error during read/write.

virtual void casa::RSFileReaderWriter::setFile ( const String filename) [virtual]

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

Converts between enum and String for SupportedType.

Returns all known SupportedTypes.

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


Member Data Documentation

Filename to be read/written.

Definition at line 130 of file RSFileReaderWriter.h.

Last error seen during read/write.

Definition at line 133 of file RSFileReaderWriter.h.


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