Loading...
Searching...
No Matches
RecordInterface.h File Reference
`#include <casacore/casa/aips.h>`
`#include <casacore/casa/BasicSL/String.h>`
`#include <casacore/casa/Utilities/DataType.h>`
`#include <casacore/casa/Containers/RecordFieldId.h>`
`#include <casacore/casa/Arrays/Array.h>`

Go to the source code of this file.

## Namespaces

namespace | casacore
| this file contains all the compiler specific defines

## Typedefs

typedef Bool | casacore::CheckFieldFunction(const String &fieldName, DataType dataType, const void *extraArgument, String &message)
| Define the signature of the add callback function.

## Enumerations

enum | casacore::RecordType { casacore::Fixed , casacore::Variable }
| More...
enum | casacore::DuplicatesFlag { casacore::RenameDuplicates , casacore::SkipDuplicates , casacore::OverwriteDuplicates , casacore::ThrowOnDuplicates }
| Define the Duplicates flag for the function merge in the various record classes. More...

## Functions

| casacore::RecordInterface ()
| The default constructor creates an empty record with a variable structure.
| casacore::RecordInterface (RecordType type, CheckFieldFunction *funcPtr, const void *checkArgument)
| Create a record with no fields.
| casacore::RecordInterface (const RecordInterface &other)
| Copy constructor (copy semantics).
RecordInterface & | casacore::operator= (const RecordInterface &other)
| Assignment (copy semantics).
virtual | casacore::~RecordInterface ()
| Destruct the record.
RecordInterface * | casacore::clone () const override
| Make a copy of this object.
void | casacore::assign (const RecordInterface &that) override
| Assign that RecordInterface object to this one.
Bool | casacore::isFixed () const
| Is the Record structure fixed (i.e.
uInt | casacore::nfields () const override
| How many fields does this structure have?
uInt | casacore::size () const
bool | casacore::empty () const
| Is the record empty?
Int | casacore::fieldNumber (const String &fieldName) const override
| Get the field number from the field name.
Int | casacore::idToNumber (const RecordFieldId &) const
| Get the field number for the given field id.
Bool | casacore::isDefined (const String &fieldName) const
| Test if a field name exists.
DataType | casacore::type (Int whichField) const override
| Get the data type of this field.
DataType | casacore::dataType (const RecordFieldId &) const
String | casacore::name (const RecordFieldId &) const
| Get the name of this field.
const String & | casacore::comment (const RecordFieldId &) const override
| Get the comment for this field.
void | casacore::setComment (const RecordFieldId &, const String &comment) override
| Set the comment for this field.
IPosition | casacore::shape (const RecordFieldId &) const
| Get the actual shape of this field.
const RecordDesc & | casacore::description () const
| Describes the current structure of this Record.
void | casacore::restructure (const RecordDesc &newDescription, Bool recursive=True) override
| Change the structure of this Record to contain the fields in newDescription.
void | casacore::removeField (const RecordFieldId &) override
| Remove a field from the record.
ValueHolder | casacore::asValueHolder (const RecordFieldId &) const override
| Get or define the value as a ValueHolder.
void | casacore::defineFromValueHolder (const RecordFieldId &, const ValueHolder &) override
void | casacore::define (const RecordFieldId &, Bool value)
| Define a value for the given field.
void | casacore::define (const RecordFieldId &, uChar value)
void | casacore::define (const RecordFieldId &, Short value)
void | casacore::define (const RecordFieldId &, Int value)
void | casacore::define (const RecordFieldId &, uInt value)
void | casacore::define (const RecordFieldId &, Int64 value)
void | casacore::define (const RecordFieldId &, Float value)
void | casacore::define (const RecordFieldId &, Double value)
void | casacore::define (const RecordFieldId &, const Complex &value)
void | casacore::define (const RecordFieldId &, const DComplex &value)
void | casacore::define (const RecordFieldId &, const Char *value)
void | casacore::define (const RecordFieldId &, const String &value)
void | casacore::define (const RecordFieldId &, const Array< Bool > &value, Bool FixedShape=False)
void | casacore::define (const RecordFieldId &, const Array< uChar > &value, Bool FixedShape=False)
void | casacore::define (const RecordFieldId &, const Array< Short > &value, Bool FixedShape=False)
void | casacore::define (const RecordFieldId &, const Array< Int > &value, Bool FixedShape=False)
void | casacore::define (const RecordFieldId &, const Array< uInt > &value, Bool FixedShape=False)
void | casacore::define (const RecordFieldId &, const Array< Int64 > &value, Bool FixedShape=False)
void | casacore::define (const RecordFieldId &, const Array< Float > &value, Bool FixedShape=False)
void | casacore::define (const RecordFieldId &, const Array< Double > &value, Bool FixedShape=False)
void | casacore::define (const RecordFieldId &, const Array< Complex > &value, Bool FixedShape=False)
void | casacore::define (const RecordFieldId &, const Array< DComplex > &value, Bool FixedShape=False)
void | casacore::define (const RecordFieldId &, const Array< String > &value, Bool FixedShape=False)
void | casacore::defineRecord (const RecordFieldId &, const RecordInterface &value, RecordType=Variable) override
void | casacore::get (const RecordFieldId &, Bool &value) const
| Get the value of the given field.
void | casacore::get (const RecordFieldId &, uChar &value) const
void | casacore::get (const RecordFieldId &, Short &value) const
void | casacore::get (const RecordFieldId &, Int &value) const
void | casacore::get (const RecordFieldId &, uInt &value) const
void | casacore::get (const RecordFieldId &, Int64 &value) const
void | casacore::get (const RecordFieldId &, Float &value) const
void | casacore::get (const RecordFieldId &, Double &value) const
void | casacore::get (const RecordFieldId &, Complex &value) const
void | casacore::get (const RecordFieldId &, DComplex &value) const
void | casacore::get (const RecordFieldId &, String &value) const
void | casacore::get (const RecordFieldId &, Array< Bool > &value) const
void | casacore::get (const RecordFieldId &, Array< uChar > &value) const
void | casacore::get (const RecordFieldId &, Array< Short > &value) const
void | casacore::get (const RecordFieldId &, Array< Int > &value) const
void | casacore::get (const RecordFieldId &, Array< uInt > &value) const
void | casacore::get (const RecordFieldId &, Array< Int64 > &value) const
void | casacore::get (const RecordFieldId &, Array< Float > &value) const
void | casacore::get (const RecordFieldId &, Array< Double > &value) const
void | casacore::get (const RecordFieldId &, Array< Complex > &value) const
void | casacore::get (const RecordFieldId &, Array< DComplex > &value) const
void | casacore::get (const RecordFieldId &, Array< String > &value) const
Bool | casacore::asBool (const RecordFieldId &) const
| The following functions get the value based on field name or number.
uChar | casacore::asuChar (const RecordFieldId &) const
Short | casacore::asShort (const RecordFieldId &) const
Int | casacore::asInt (const RecordFieldId &) const
uInt | casacore::asuInt (const RecordFieldId &) const
Int64 | casacore::asInt64 (const RecordFieldId &) const
Float | casacore::asFloat (const RecordFieldId &) const
Double | casacore::asDouble (const RecordFieldId &) const
Complex | casacore::asComplex (const RecordFieldId &) const
DComplex | casacore::asDComplex (const RecordFieldId &) const
const String & | casacore::asString (const RecordFieldId &) const
const Array< Bool > & | casacore::asArrayBool (const RecordFieldId &) const
const Array< uChar > & | casacore::asArrayuChar (const RecordFieldId &) const
const Array< Short > & | casacore::asArrayShort (const RecordFieldId &) const
const Array< Int > & | casacore::asArrayInt (const RecordFieldId &) const
const Array< uInt > & | casacore::asArrayuInt (const RecordFieldId &) const
const Array< Int64 > & | casacore::asArrayInt64 (const RecordFieldId &) const
const Array< Float > & | casacore::asArrayFloat (const RecordFieldId &) const
const Array< Double > & | casacore::asArrayDouble (const RecordFieldId &) const
const Array< Complex > & | casacore::asArrayComplex (const RecordFieldId &) const
const Array< DComplex > & | casacore::asArrayDComplex (const RecordFieldId &) const
const Array< String > & | casacore::asArrayString (const RecordFieldId &) const
const RecordInterface & | casacore::asRecord (const RecordFieldId &) const override
RecordInterface & | casacore::asrwRecord (const RecordFieldId &) override
Array< Bool > | casacore::toArrayBool (const RecordFieldId &) const
| Get an array while promoting the data as needed.
Array< uChar > | casacore::toArrayuChar (const RecordFieldId &) const
Array< Short > | casacore::toArrayShort (const RecordFieldId &) const
Array< Int > | casacore::toArrayInt (const RecordFieldId &) const
Array< uInt > | casacore::toArrayuInt (const RecordFieldId &) const
Array< Int64 > | casacore::toArrayInt64 (const RecordFieldId &) const
Array< Float > | casacore::toArrayFloat (const RecordFieldId &) const
Array< Double > | casacore::toArrayDouble (const RecordFieldId &) const
Array< Complex > | casacore::toArrayComplex (const RecordFieldId &) const
Array< DComplex > | casacore::toArrayDComplex (const RecordFieldId &) const
Array< String > | casacore::toArrayString (const RecordFieldId &) const
void | casacore::toArray (const RecordFieldId &id, Array< Bool > &array) const
void | casacore::toArray (const RecordFieldId &id, Array< uChar > &array) const
void | casacore::toArray (const RecordFieldId &id, Array< Short > &array) const
void | casacore::toArray (const RecordFieldId &id, Array< Int > &array) const
void | casacore::toArray (const RecordFieldId &id, Array< uInt > &array) const
void | casacore::toArray (const RecordFieldId &id, Array< Int64 > &array) const
void | casacore::toArray (const RecordFieldId &id, Array< Float > &array) const
void | casacore::toArray (const RecordFieldId &id, Array< Double > &array) const
void | casacore::toArray (const RecordFieldId &id, Array< Complex > &array) const
void | casacore::toArray (const RecordFieldId &id, Array< DComplex > &array) const
void | casacore::toArray (const RecordFieldId &id, Array< String > &array) const
Float | casacore::asfloat (const RecordFieldId &) const
| Get value based on field name or number.
Double | casacore::asdouble (const RecordFieldId &) const
const Array< Float > & | casacore::asArrayfloat (const RecordFieldId &) const
const Array< Double > & | casacore::asArraydouble (const RecordFieldId &) const
void | casacore::makeUnique () override
| Make a unique record representation (to do copy-on-write in RecordFieldPtr).
void | casacore::defineDataField (Int whichField, DataType type, const void *value) override
| Define a value in the given field.
void * | casacore::get_pointer (Int whichField, DataType type) const override
| Used by the RecordField classes to attach in a type-safe way to the correct field.
void * | casacore::get_pointer (Int whichField, DataType type, const String &recordType) const override
std::ostream & | casacore::operator<< (std::ostream &os, const RecordInterface &rec)
| Print the contents of the record.
void | casacore::print (std::ostream &, Int maxNrValues=25, const String &indent="") const override
| Print the contents of the record.
void | casacore::addDataField (const String &name, DataType type, const IPosition &shape, Bool fixedShape, const void *value) override
| Add a field to the record.
void | casacore::throwIfFixed () const
| Check if the Record has a non-fixed structure.
void | casacore::checkName (const String &fieldName, DataType type) const
| Check if the new field name is correct.
RecordType & | casacore::recordType ()
| Give access to the RecordType flag (write-access is needed when a record is read back).
Int | casacore::newIdToNumber (const RecordFieldId &) const
| Get the field number for the given field id.
void | casacore::defineField (const RecordFieldId &, DataType type, const void *value)
| Add a scalar field with the given type and value.
void | casacore::defineField (const RecordFieldId &, DataType type, const IPosition &shape, Bool fixedShape, const void *value)
| Add an array field with the given type, shape and value.
RecordDesc | casacore::getDescription () const override
| Get the description of this record.

## Variables

CheckFieldFunction * | casacore::checkFunction_p
| Holds the callback function plus argument.
const void * | casacore::checkArgument_p
RecordType | casacore::type_p
| Defines if the Record has a fixed structure.