casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
casacore::RFReaderWriter Class Reference

Superclass for readers and writers containing common definitions and operations. More...

#include <RFReaderWriter.h>

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

Public Types

enum  SupportedType {
  AIPS_BOX,
  DS9,
  CASA_XML,
  AIPS_IO
}
 An enum of all known subclasses/formats supported. More...
 

Public Member Functions

 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...
 

Static Public Member Functions

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

virtual void setError (const String &error, bool fatal=false) const
 Convenience method for setting last error during read/write. More...
 

Protected Attributes

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

Superclass for readers and writers containing common definitions and operations.

Intended use:

Public interface

Synopsis

Example

Definition at line 119 of file RFReaderWriter.h.

Member Enumeration Documentation

An enum of all known subclasses/formats supported.

Enumerator
AIPS_BOX 
DS9 
CASA_XML 
AIPS_IO 

Definition at line 123 of file RFReaderWriter.h.

Constructor & Destructor Documentation

casacore::RFReaderWriter::RFReaderWriter ( )
inline

Constructor.

Definition at line 156 of file RFReaderWriter.h.

virtual casacore::RFReaderWriter::~RFReaderWriter ( )
inlinevirtual

Destructor.

Definition at line 159 of file RFReaderWriter.h.

Member Function Documentation

static String casacore::RFReaderWriter::extensionForType ( SupportedType  type)
static

Returns the file extension for the given SupportedType.

virtual const RFError& casacore::RFReaderWriter::lastError ( ) const
virtual

Returns the last error set during read/write.

static Record* casacore::RFReaderWriter::optionsWidgetForType ( SupportedType  type)
static

Returns an new appropriate options widget for the given SupportedType, or NULL for an error (shouldn't happen).

static RFReader* casacore::RFReaderWriter::readerForType ( SupportedType  type)
static

Returns an appropriate child RFReader class for the given SupportedType, or NULL for an error (shouldn't happen).

virtual void casacore::RFReaderWriter::setError ( const String error,
bool  fatal = false 
) const
protectedvirtual

Convenience method for setting last error during read/write.

virtual void casacore::RFReaderWriter::setFile ( const String filename)
virtual

Sets the file to be read/written to the given.

Referenced by casacore::RFReader::readFile(), and casacore::RFWriter::writeFile().

virtual void casacore::RFReaderWriter::setName ( const String regionName)
virtual

Sets the region name associated withe the file to be read or written.

static SupportedType casacore::RFReaderWriter::supportedTypes ( String  type)
static

Converts between enum and String for SupportedType.

static String casacore::RFReaderWriter::supportedTypes ( SupportedType  type)
static
static Vector<SupportedType> casacore::RFReaderWriter::supportedTypes ( )
static

Returns all known SupportedTypes.

static Vector<String> casacore::RFReaderWriter::supportedTypeStrings ( )
static
static RFWriter* casacore::RFReaderWriter::writerForType ( SupportedType  type)
static

Returns an new appropriate child RfWriter class for the given SupportedType, or NULL for an error (shouldn't happen).

Member Data Documentation

RFError casacore::RFReaderWriter::lastError_p
protected

Last error seen during read/write.

Definition at line 178 of file RFReaderWriter.h.

Record casacore::RFReaderWriter::options_p
protected

Record containg plotting options for the regions.

Definition at line 181 of file RFReaderWriter.h.

Referenced by casacore::RFReader::options(), and casacore::RFWriter::setOptions().

String* casacore::RFReaderWriter::pFilename_p
protected

Filename to be read/written.

Definition at line 172 of file RFReaderWriter.h.

String* casacore::RFReaderWriter::pRegionName_p
protected

Name to be assigned to the region.

Definition at line 175 of file RFReaderWriter.h.


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