casa
$Rev:20696$
|
Superclass for readers and writers containing common definitions and operations. More...
#include <RSFileReaderWriter.h>
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 RFError & | lastError () 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< SupportedType > | supportedTypes () |
Returns all known SupportedTypes. | |
static vector< String > | supportedTypesStrings () |
static RSFileReader * | readerForType (SupportedType type) |
Returns an appropriate child RegionFileReader class for the given SupportedType, or NULL for an error (shouldn't happen). | |
static RSFileWriter * | writerForType (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. |
Superclass for readers and writers containing common definitions and operations.
Definition at line 77 of file RSFileReaderWriter.h.
Public Static Methods //.
An enum of all known subclasses/formats supported.
Definition at line 82 of file RSFileReaderWriter.h.
casa::RSFileReaderWriter::RSFileReaderWriter | ( | ) | [inline] |
virtual casa::RSFileReaderWriter::~RSFileReaderWriter | ( | ) | [inline, virtual] |
Destructor.
Definition at line 120 of file RSFileReaderWriter.h.
static 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 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.
static SupportedType casa::RSFileReaderWriter::supportedType | ( | String | type | ) | [static] |
Converts between enum and String for SupportedType.
static String casa::RSFileReaderWriter::supportedType | ( | SupportedType | type | ) | [static] |
static vector<SupportedType> casa::RSFileReaderWriter::supportedTypes | ( | ) | [static] |
Returns all known SupportedTypes.
static vector<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).
String casa::RSFileReaderWriter::m_filename [protected] |
Filename to be read/written.
Definition at line 130 of file RSFileReaderWriter.h.
RFError casa::RSFileReaderWriter::m_lastError [protected] |
Last error seen during read/write.
Definition at line 133 of file RSFileReaderWriter.h.