28 #ifndef IMAGES_RFREADERWRITER_H
29 #define IMAGES_RFREADERWRITER_H
86 void set(
const String& error,
bool isFatal =
false);
184 virtual void setError(
const String& error,
bool fatal =
false)
const;
303 virtual bool write(
const Record& region)
const = 0;
309 return write(regions);
virtual bool writeFile(const String &filename, const Record ®ions)
Calls setFile then write.
bool isFatal() const
Returns whether this error was fatal or not.
A 1-D Specialization of the Array class.
Abstract superclass for any class that reads a format that produces Regions from a file...
void defineRecord(const RecordFieldId &, const Record &value, RecordType type=Variable)
Define a value for the given field containing a subrecord.
RFError()
Constructor, blank error.
virtual ~RFReader()
Destructor.
virtual ~RFReaderWriter()
Destructor.
virtual const RFError & lastError() const
Returns the last error set during read/write.
void set(const String &error, bool isFatal=false)
Sets the error.
Abstract superclass for any class that writes Regions to a region file format.
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...
static Vector< SupportedType > supportedTypes()
Returns all known SupportedTypes.
RFReaderWriter()
Constructor.
virtual void setOptions(const Record *options)
Sets the optional to the values.
virtual casacore::String type() const
Implements RegionShape::type.
static String extensionForType(SupportedType type)
Returns the file extension for the given SupportedType.
const String & error() const
Returns this error's text.
virtual void setName(const String ®ionName)
Sets the region name associated withe the file to be read or written.
String * pFilename_p
Filename to be read/written.
static RFReader * readerForType(SupportedType type)
Returns an appropriate child RFReader class for the given SupportedType, or NULL for an error (should...
Convenience class for a String/bool pair.
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...
virtual void setError(const String &error, bool fatal=false) const
Convenience method for setting last error during read/write.
A hierarchical collection of named fields of various types.
virtual bool readFile(const String &file, Record ®ion)
Calls setFile() then read().
String * pRegionName_p
Name to be assigned to the region.
virtual ~RFWriter()
Destructor.
static Vector< String > supportedTypeStrings()
virtual Record * options()
Provides access to the plotting options that were found in the region file.
static Record * optionsWidgetForType(SupportedType type)
Returns an new appropriate options widget for the given SupportedType, or NULL for an error (shouldn'...
Superclass for readers and writers containing common definitions and operations.
virtual bool read(Record ®ion)=0
reported, false otherwise.
String: the storage and methods of handling collections of characters.
SupportedType
An enum of all known subclasses/formats supported.
virtual void setFile(const String &filename)
Sets the file to be read/written to the given.
Record options_p
Record containg plotting options for the regions.
Defines nreal time structures used by the VLA table filler.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.