Go to the documentation of this file.
34 #include <casacore/casa/aips.h>
35 #include <casacore/casa/Containers/RecordInterface.h>
36 #include <casacore/casa/Containers/RecordRep.h>
37 #include <casacore/casa/Containers/RecordDesc.h>
38 #include <casacore/casa/Utilities/COWPtr.h>
43 template<
class T>
class Array;
296 virtual DataType
type (
Int whichField)
const;
390 virtual void print (std::ostream&,
391 Int maxNrValues = 25,
392 const String& indent=
"")
const;
virtual Int fieldNumber(const String &fieldName) const
Get the field number from the field name.
Description of the fields in a record object.
const Record & subRecord(const RecordFieldId &) const
Get the subrecord from the given field.
virtual void * get_pointer(Int whichField, DataType type) const
Used by the RecordField classes to attach in a type-safe way to the correct field.
virtual ValueHolder asValueHolder(const RecordFieldId &) const
Get or define the value as a ValueHolder.
COWPtr< RecordRep > rep_p
The Record representation.
A Vector of integers, for indexing into Array<T> objects.
RecordType & recordType()
Give access to the RecordType flag (write-access is needed when a record is read back).
void getData(AipsIO &os, uInt version)
Read the data of a record.
IPosition shape(const RecordFieldId &) const
Get the actual shape of this field.
AipsIO is the object persistency mechanism of Casacore
virtual RecordInterface * clone() const
Make a copy of this object.
DuplicatesFlag
Define the Duplicates flag for the function merge in the various record classes.
Record has a fixed structure; that is, no fields can be added or removed once the Record is created.
friend AipsIO & operator<<(AipsIO &os, const Record &rec)
Write the Record to an output stream.
Bool conform(const RecordRep &other) const
Returns True if this and other have the same RecordDesc, other than different names for the fields.
void mergeField(const Record &other, const RecordFieldId &, DuplicatesFlag=ThrowOnDuplicates)
Merge a field from another record into this record.
The representation of a Record.
void renameField(const String &newName, const RecordFieldId &)
Rename the given field.
friend AipsIO & operator>>(AipsIO &os, Record &rec)
Read the Record from an input stream.
AipsIO & operator>>(AipsIO &os, Record &rec)
virtual ~Record()
Release resources associated with this object.
void putData(AipsIO &os) const
Put the data of a record.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
virtual DataType type(Int whichField) const
Get the data type of this field.
RecordType
Define the flag telling if a Record has a fixed or variable structure.
void getRecord(AipsIO &os)
Read the Record from an input stream.
RecordRep & rwRef()
Return a non-const reference to the underlying RecordRep.
String name(const RecordFieldId &) const
Get the name of this field.
void putData(AipsIO &os) const
Put the data of a record.
void defineRecord(const RecordFieldId &, const Record &value, RecordType type=Variable)
Define a value for the given field containing a subrecord.
virtual RecordInterface & asrwRecord(const RecordFieldId &)
virtual const RecordInterface & asRecord(const RecordFieldId &) const
void getData(AipsIO &os, uInt version)
Read the data of a record.
virtual void restructure(const RecordDesc &newDescription, Bool recursive=True)
Change the structure of this Record to contain the fields in newDescription.
void merge(const Record &other, DuplicatesFlag=ThrowOnDuplicates)
Merge all fields from the other record into this record.
this file contains all the compiler specific defines
Copy-On-Write-Pointer class - allows control of copy based on constness.
Record & operator=(const Record &other)
Copy the data in the other record to this record.
const RecordDesc & description() const
Describes the current structure of this Record.
virtual void setComment(const RecordFieldId &, const String &comment)
Set the comment for this field.
virtual uInt nfields() const
How many fields does this structure have? A convenient synonym for description().nfields().
Abstract base class for Record classes.
void removeField(const RecordFieldId &)
Remove a field from the record.
void putRecord(AipsIO &os) const
Write the Record to an output stream.
virtual void defineDataField(Int whichField, DataType type, const void *value)
Define a value in the given field.
Record & rwSubRecord(const RecordFieldId &)
String: the storage and methods of handling collections of characters.
bool Bool
Define the standard types used by Casacore.
A holder for a value of any basic Casacore data type.
virtual void addDataField(const String &name, DataType type, const IPosition &shape, Bool fixedShape, const void *value)
Add a field to the record.
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.
Bool conform(const Record &other) const
Returns True if this and other have the same RecordDesc, other than different names for the fields.
A hierarchical collection of named fields of various types.
virtual const String & comment(const RecordFieldId &) const
Get the comment for this field.
Record()
Create a record with no fields.
virtual void makeUnique()
Make a unique record representation (to do copy-on-write in RecordFieldPtr).
Bool CheckFieldFunction(const String &fieldName, DataType dataType, const void *extraArgument, String &message)
Define the signature of the add callback function.
virtual void defineFromValueHolder(const RecordFieldId &, const ValueHolder &)
virtual RecordDesc getDescription() const
Get the description of this record.
The identification of a record field.
virtual void assign(const RecordInterface &that)
Assign that RecordInterface object to this one.
const RecordRep & ref() const
Return a const reference to the underlying RecordRep.
const RecordDesc & description() const
Describes the current structure of this Record.
Record has a variable structure; after Record creation fields can be added or removed at will.
virtual void print(std::ostream &, Int maxNrValues=25, const String &indent="") const
Print the contents of the record.
RecordRep * parent_p
The parent Record.