casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
casacore::RFReader Class Referenceabstract

Abstract superclass for any class that reads a format that produces Regions from a file. More...

#include <RFReaderWriter.h>

Inheritance diagram for casacore::RFReader:
casacore::RFReaderWriter casacore::AipsIOReaderWriter

Public Member Functions

 RFReader ()
 Constructor. More...
 
virtual ~RFReader ()
 Destructor. More...
 
virtual Recordoptions ()
 Provides access to the plotting options that were found in the region file. More...
 
virtual bool read (Record &region)=0
 reported, false otherwise. More...
 
virtual bool readFile (const String &file, Record &region)
 Calls setFile() then read(). More...
 
- Public Member Functions inherited from casacore::RFReaderWriter
 RFReaderWriter ()
 Constructor. More...
 
virtual ~RFReaderWriter ()
 Destructor. More...
 
virtual void setFile (const String &filename)
 Sets the file to be read/written to the given. More...
 
virtual void setName (const String &regionName)
 Sets the region name associated withe the file to be read or written. More...
 
virtual const RFErrorlastError () const
 Returns the last error set during read/write. More...
 

Additional Inherited Members

- Public Types inherited from casacore::RFReaderWriter
enum  SupportedType {
  AIPS_BOX,
  DS9,
  CASA_XML,
  AIPS_IO
}
 An enum of all known subclasses/formats supported. More...
 
- Static Public Member Functions inherited from casacore::RFReaderWriter
static SupportedType supportedTypes (String type)
 Converts between enum and String for SupportedType. More...
 
static String supportedTypes (SupportedType type)
 
static String extensionForType (SupportedType type)
 Returns the file extension for the given SupportedType. More...
 
static Vector< SupportedTypesupportedTypes ()
 Returns all known SupportedTypes. More...
 
static Vector< StringsupportedTypeStrings ()
 
static RFReaderreaderForType (SupportedType type)
 Returns an appropriate child RFReader class for the given SupportedType, or NULL for an error (shouldn't happen). More...
 
static RFWriterwriterForType (SupportedType type)
 Returns an new appropriate child RfWriter class for the given SupportedType, or NULL for an error (shouldn't happen). More...
 
static RecordoptionsWidgetForType (SupportedType type)
 Returns an new appropriate options widget for the given SupportedType, or NULL for an error (shouldn't happen). More...
 
- Protected Member Functions inherited from casacore::RFReaderWriter
virtual void setError (const String &error, bool fatal=false) const
 Convenience method for setting last error during read/write. More...
 
- Protected Attributes inherited from casacore::RFReaderWriter
StringpFilename_p
 Filename to be read/written. More...
 
StringpRegionName_p
 Name to be assigned to the region. More...
 
RFError lastError_p
 Last error seen during read/write. More...
 
Record options_p
 Record containg plotting options for the regions. More...
 

Detailed Description

Abstract superclass for any class that reads a format that produces Regions from a file.

Intended use:

Public interface

Synopsis

Provide a well defined set of operations for reading region files, regardless of the data format.

Note that some file formats allow for plotting options to be defined as well as the regions. These options are read and stored in a record of..., the contents of this record is ill-defined (ie. there is no standard).

There may come a time where a standard is necessary.

Example

Definition at line 222 of file RFReaderWriter.h.

Constructor & Destructor Documentation

casacore::RFReader::RFReader ( )
inline

Constructor.

Definition at line 226 of file RFReaderWriter.h.

virtual casacore::RFReader::~RFReader ( )
inlinevirtual

Destructor.

Definition at line 229 of file RFReaderWriter.h.

Member Function Documentation

virtual Record* casacore::RFReader::options ( )
inlinevirtual

Provides access to the plotting options that were found in the region file.

Definition at line 233 of file RFReaderWriter.h.

References casacore::RFReaderWriter::options_p.

virtual bool casacore::RFReader::read ( Record region)
pure virtual

reported, false otherwise.

If false is returned, the details can be found using lastError(). Any valid Regions that were read from the file are placed in the given vector (which is cleared first).

Implemented in casacore::AipsIOReaderWriter.

Referenced by readFile().

virtual bool casacore::RFReader::readFile ( const String file,
Record region 
)
inlinevirtual

Calls setFile() then read().

Definition at line 244 of file RFReaderWriter.h.

References read(), and casacore::RFReaderWriter::setFile().


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