28 #ifndef IMAGES_RFREADERWRITER_H
29 #define IMAGES_RFREADERWRITER_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/Logging/LogIO.h>
34 #include <casacore/casa/Containers/Record.h>
35 #include <casacore/coordinates/Coordinates/CoordinateSystem.h>
309 return write(regions);
bool isFatal() const
Returns whether this error was fatal or not.
void set(const String &error, bool isFatal=false)
Sets the error.
const String & error() const
Returns this error's text.
RFError()
Constructor, blank error.
RFError(const String &error, bool isFatal=false)
Constructor, error with the given text and isFatal flag.
Superclass for readers and writers containing common definitions and operations.
static RFReader * readerForType(SupportedType type)
Returns an appropriate child RFReader class for the given SupportedType, or NULL for an error (should...
virtual void setFile(const String &filename)
Sets the file to be read/written to the given.
static Vector< SupportedType > supportedTypes()
Returns all known SupportedTypes.
SupportedType
An enum of all known subclasses/formats supported.
Record options_p
Record containg plotting options for the regions.
static Vector< String > supportedTypeStrings()
virtual void setName(const String ®ionName)
Sets the region name associated withe the file to be read or written.
static String supportedTypes(SupportedType type)
virtual ~RFReaderWriter()
Destructor.
static SupportedType supportedTypes(String type)
Converts between enum and String for SupportedType.
String * pFilename_p
Filename to be read/written.
virtual const RFError & lastError() const
Returns the last error set during read/write.
static String extensionForType(SupportedType type)
Returns the file extension for the given SupportedType.
RFReaderWriter()
Constructor.
static Record * optionsWidgetForType(SupportedType type)
Returns an new appropriate options widget for the given SupportedType, or NULL for an error (shouldn'...
String * pRegionName_p
Name to be assigned to the region.
virtual void setError(const String &error, bool fatal=false) const
Convenience method for setting last error during read/write.
RFError lastError_p
Last error seen during read/write.
static RFWriter * writerForType(SupportedType type)
Returns an new appropriate child RfWriter class for the given SupportedType, or NULL for an error (sh...
Abstract superclass for any class that reads a format that produces Regions from a file.
virtual bool readFile(const String &file, Record ®ion)
Calls setFile() then read().
virtual ~RFReader()
Destructor.
virtual Record * options()
Provides access to the plotting options that were found in the region file.
virtual bool read(Record ®ion)=0
reported, false otherwise.
Abstract superclass for any class that writes Regions to a region file format.
virtual bool writeFile(const String &filename, const Record ®ions)
Calls setFile then write.
virtual ~RFWriter()
Destructor.
virtual void setOptions(const Record *options)
Sets the optional to the values.
virtual bool write(const Record ®ion) const =0
Write the given regions to the filename set with setFile and returns true if no errors were reported,...
void defineRecord(const RecordFieldId &, const Record &value, RecordType type=Variable)
Define a value for the given field containing a subrecord.
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines