Loading...
Searching...
No Matches
casacore::RFReaderWriter Class Reference
images package (libcasa_images) » Regions_module

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

`#include <RFReaderWriter.h>`

## 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.
virtual | ~RFReaderWriter ()
| Destructor.
virtual void | setFile (const String &filename)
| Sets the file to be read/written to the given.
virtual void | setName (const String &regionName)
| Sets the region name associated withe the file to be read or written.
virtual const RFError & | lastError () const
| Returns the last error set during read/write.

## Static Public Member Functions

static SupportedType | supportedTypes (String type)
| Converts between enum and String for SupportedType.
static String | supportedTypes (SupportedType type)
static String | extensionForType (SupportedType type)
| Returns the file extension for the given SupportedType.
static Vector< SupportedType > | supportedTypes ()
| Returns all known SupportedTypes.
static Vector< String > | supportedTypeStrings ()
static RFReader * | readerForType (SupportedType type)
| Returns an appropriate child RFReader class for the given SupportedType, or NULL for an error (shouldn't happen).
static RFWriter * | writerForType (SupportedType type)
| Returns an new appropriate child RfWriter class for the given SupportedType, or NULL for an error (shouldn't happen).
static Record * | optionsWidgetForType (SupportedType type)
| Returns an new appropriate options widget for the given SupportedType, or NULL for an error (shouldn't happen).

## Protected Member Functions

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

## Protected Attributes

String * | pFilename_p
| Filename to be read/written.
String * | pRegionName_p
| Name to be assigned to the region.
RFError | lastError_p
| Last error seen during read/write.
Record | options_p
| Record containg plotting options for the regions.

## Detailed Description

Superclass for readers and writers containing common definitions and operations.

### Intended use:

Public interface

### Synopsis

### Example

Definition at line 117 of file RFReaderWriter.h.

## Member Enumeration Documentation

## SupportedType

enum casacore::RFReaderWriter::SupportedType

An enum of all known subclasses/formats supported.

Enumerator
AIPS_BOX |
DS9 |
CASA_XML |
AIPS_IO |

Definition at line 121 of file RFReaderWriter.h.

## Constructor & Destructor Documentation

## RFReaderWriter()

casacore::RFReaderWriter::RFReaderWriter | ( |  | ) |

inline

Constructor.

Definition at line 154 of file RFReaderWriter.h.

## ~RFReaderWriter()

virtual casacore::RFReaderWriter::~RFReaderWriter | ( |  | ) |

inline virtual

Destructor.

Definition at line 157 of file RFReaderWriter.h.

## Member Function Documentation

## extensionForType()

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

static

Returns the file extension for the given SupportedType.

## lastError()

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

virtual

Returns the last error set during read/write.

## optionsWidgetForType()

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

References casacore::Record().

## readerForType()

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

## setError()

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

protected virtual

Convenience method for setting last error during read/write.

## setFile()

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

## setName()

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

virtual

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

## supportedTypes() [1/3]

Vector< SupportedType > casacore::RFReaderWriter::supportedTypes | ( |  | ) |

static

Returns all known SupportedTypes.

## supportedTypes() [2/3]

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

static

Converts between enum and String for SupportedType.

## supportedTypes() [3/3]

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

static

## supportedTypeStrings()

Vector< String > casacore::RFReaderWriter::supportedTypeStrings | ( |  | ) |

static

## writerForType()

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

## lastError_p

RFError casacore::RFReaderWriter::lastError_p

protected

Last error seen during read/write.

Definition at line 176 of file RFReaderWriter.h.

## options_p

Record casacore::RFReaderWriter::options_p

protected

Record containg plotting options for the regions.

Definition at line 179 of file RFReaderWriter.h.

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

## pFilename_p

String* casacore::RFReaderWriter::pFilename_p

protected

Filename to be read/written.

Definition at line 170 of file RFReaderWriter.h.

## pRegionName_p

String* casacore::RFReaderWriter::pRegionName_p

protected

Name to be assigned to the region.

Definition at line 173 of file RFReaderWriter.h.

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

- images/Regions/RFReaderWriter.h