30 #ifndef TABLES_TABLERECORDREP_H
31 #define TABLES_TABLERECORDREP_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/casa/Containers/RecordRep.h>
182 const String& oldParentName);
214 const String& recordType)
const;
230 Int maxNrValues = 25,
231 const String& indent=
"")
const;
void renameField(const String &newName, Int whichField)
Rename the given field.
const String & comment(Int whichField) const
Get the comment for this field.
void setComment(Int whichField, const String &comment)
Set the comment for this field.
RecordType
Define the flag telling if a Record has a fixed or variable structure.
DuplicatesFlag
Define the Duplicates flag for the function merge in the various record classes.
String: the storage and methods of handling collections of characters.
void copy_other(const TableRecordRep &other)
Utility function to avoid code duplication in the public member functions.
virtual void removeData(Int whichField, void *ptr, void *vecptr)
Remove a data field.
void getRecord(AipsIO &os, Int &recordType, const TableAttr &)
Get the description and data of the Record.
void print(std::ostream &, Int maxNrValues=25, const String &indent="") const
Print a record.
void merge(const TableRecordRep &other, RecordInterface::DuplicatesFlag)
Merge all fields from the other record into this record.
void closeTables() const
Close all open tables.
const RecordDesc & description() const
Describes the current structure of this Record.
void setComment(Int whichField, const String &comment)
Set the comment for this field.
void reopenRW()
Reopen possible tables in keywords as read/write.
TableRecordRep()
Create a record with no fields.
Bool areTablesMultiUsed() const
Are subtables used in other processes.
void * get_pointer(Int whichField, DataType type) const
Used by the RecordFieldPtr classes to attach in a type-safe way to the correct field.
TableRecordRep & operator=(const TableRecordRep &other)
Copy all the data over.
void putRecord(AipsIO &os, Int recordType, const TableAttr &) const
Put the description and data of the Record.
virtual Int fieldNumber(const String &name) const
Get the field number for a given name.
void restructure(const RecordDesc &newDescription, Bool recursive)
Change the structure of this Record to contain the fields in newDescription.
void getData(AipsIO &os, uInt version, const TableAttr &)
Read the data of a record.
void putData(AipsIO &os, const TableAttr &) const
Put the data of a record.
void renameTables(const String &newParentName, const String &oldParentName)
Rename the subtables with a path containing the old parent table name.
Bool conform(const TableRecordRep &other) const
Returns True if this and other have the same RecordDesc, other than different names for the fields.
TableRecordRep(const TableRecordRep &other)
Create a copy of other using copy semantics.
~TableRecordRep()
Delete all data.
void mergeField(const TableRecordRep &other, Int whichFieldFromOther, RecordInterface::DuplicatesFlag)
Merge a field from another record into this record.
void flushTables(Bool fsync) const
Flush all open subtables.
RecordDesc desc_p
Holds the description.
TableRecordRep(const RecordDesc &description)
Create a record with the given description.
void getTableKeySet(AipsIO &os, uInt version, const TableAttr &, uInt type)
Get a KeywordSet object as a TableRecord.
void defineDataField(Int whichField, DataType type, const void *value)
Define a value for the given field.
void renameField(const String &newName, Int whichField)
Rename the given field.
void closeTable(Int whichField) const
Close the table in the given field.
void addField(const String &name, const TableRecord &value, RecordInterface::RecordType type)
Add a field with the given name and value to the record.
const String & comment(Int whichField) const
Get the comment for this field.
virtual void removeFieldFromDesc(Int whichField)
Remove a field from the description.
void * get_pointer(Int whichField, DataType type, const String &recordType) const
virtual void addFieldToDesc(const String &name, DataType type, const IPosition &shape, Bool fixedShape)
Add a field to the description.
void copyData(const TableRecordRep &other)
Copy all data of the TableRecord.
void addField(const String &name, const Table &value, RecordInterface::RecordType type)
this file contains all the compiler specific defines
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape.
bool Bool
Define the standard types used by Casacore.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.