26#ifndef IMAGES_RFREADERWRITER_H
27#define IMAGES_RFREADERWRITER_H
30#include <casacore/casa/aips.h>
31#include <casacore/casa/Logging/LogIO.h>
32#include <casacore/casa/Containers/Record.h>
33#include <casacore/coordinates/Coordinates/CoordinateSystem.h>
294 options_p.defineRecord(
"regionoptions", *options );
307 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.
virtual void setFile(const String &filename)
Sets the file to be read/written to the given.
SupportedType
An enum of all known subclasses/formats supported.
Record options_p
Record containg plotting options for the regions.
virtual void setName(const String ®ionName)
Sets the region name associated withe the file to be read or written.
static String supportedTypes(SupportedType type)
static Vector< SupportedType > supportedTypes()
Returns all known SupportedTypes.
virtual const RFError & lastError() const
Returns the last error set during read/write.
virtual ~RFReaderWriter()
Destructor.
static RFWriter * writerForType(SupportedType type)
Returns an new appropriate child RfWriter class for the given SupportedType, or NULL for an error (sh...
static Record * optionsWidgetForType(SupportedType type)
Returns an new appropriate options widget for the given SupportedType, or NULL for an error (shouldn'...
static SupportedType supportedTypes(String type)
Converts between enum and String for SupportedType.
String * pFilename_p
Filename to be read/written.
static String extensionForType(SupportedType type)
Returns the file extension for the given SupportedType.
RFReaderWriter()
Constructor.
static Vector< String > supportedTypeStrings()
String * pRegionName_p
Name to be assigned to the region.
static RFReader * readerForType(SupportedType type)
Returns an appropriate child RFReader class for the given SupportedType, or NULL for an error (should...
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.
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 Record * options()
Provides access to the plotting options that were found in the region file.
virtual ~RFReader()
Destructor.
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,...
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
virtual int read()
The read()' and write()' functions control reading and writing data from the external FITS I/O medium...