30 #ifndef CASA_RECORDREP_H
31 #define CASA_RECORDREP_H
201 const String& recordType)
const;
215 void print (std::ostream&,
216 Int maxNrValues = 25,
217 const String& indent=
"")
const;
240 const void* value,
const String& fieldName);
247 virtual void removeData (
Int whichField,
void* ptr,
void* vecptr);
262 void copyDataField (DataType type,
void* ptr,
const void* that)
const;
268 const void* ptr)
const;
void renameField(const String &newName, Int whichField)
Rename the given field.
A Vector of integers, for indexing into Array<T> objects.
void setComment(Int whichField, const String &comment)
Set the comment for this field.
void restructure(const RecordDesc &newDescription, Bool recursive)
Change the structure of this Record to contain the fields in newDescription.
RecordType
Define the flag telling if a Record has a fixed or variable structure.
void getDataField(AipsIO &os, DataType type, void *ptr)
Get a data field.
virtual Int fieldNumber(const String &name) const
Get the field number for a given name.
RecordRep()
Create a record with no fields.
AipsIO is the object persistency mechanism of Casacore.
virtual void removeFieldFromDesc(Int whichField)
Remove a field from the description.
Block< void * > data_p
Pointers to data values.
void defineDataField(Int whichField, DataType type, const void *value)
Define a value for the given field.
void makeDataVec(Int whichField, DataType type)
Make an array for a scalar data field.
void removeDataPtr(Int index)
Remove a data pointer add the given index.
void getKeySet(AipsIO &os, uInt version, uInt type)
Get a Scalar/ArrayKeywordSet object as a Record.
The representation of a Record.
void renameField(const String &newName, Int whichField)
Rename the given field.
void copy_other(const RecordRep &other)
virtual casacore::String type() const
Implements RegionShape::type.
void merge(const RecordRep &other, RecordInterface::DuplicatesFlag)
Merge all fields from the other record into this record.
void getRecord(AipsIO &os, Int &recordType)
Get the description and data of the Record.
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
const String & comment(Int whichField) const
Get the comment for this field.
const String & comment(Int whichField) const
Get the comment for this field.
void checkShape(DataType type, const IPosition &shape, const void *value, const String &fieldName)
Check if the shape of the data array matches the shape of a fixed-shaped array in the description...
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
void putRecord(AipsIO &os, int recordType) const
Put the description and data of the Record.
void getKeyDesc(AipsIO &os, RecordDesc &desc)
Get the description of a keyword set as a RecordDesc.
void * createDataField(DataType type, const IPosition &shape)
Create a data field for the given type and shape.
void getScalarKeys(AipsIO &os)
Get the scalar values of a keyword set.
virtual void addFieldToDesc(const String &name, DataType type, const IPosition &shape, Bool fixedShape)
Add a field to the description.
void addDataField(const String &name, DataType type, const IPosition &shape, Bool fixedShape, const void *data)
Add a field with the given name and value to the record.
void getArrayKeys(AipsIO &os)
Get the array values of a keyword set.
Description of the fields in a record object.
void copyDataField(DataType type, Int whichField, const void *that) const
Copy a data field.
Block< void * > datavec_p
Pointers to a vector of a scalar (to access a scalar as an array).
void removeField(Int whichField)
Remove a field from the record.
void addField(const String &name, const Record &value, RecordInterface::RecordType type)
void printDataField(std::ostream &os, DataType type, const String &indent, Int maxNrValues, const void *ptr) const
Print a data field.
DuplicatesFlag
Define the Duplicates flag for the function merge in the various record classes.
virtual void removeData(Int whichField, void *ptr, void *vecptr)
Remove a data field.
virtual ~RecordRep()
Delete all data.
void putData(AipsIO &os) const
Put the data of a record.
uInt nused_p
#Entries used in data_p.
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
RecordRep & operator=(const RecordRep &other)
Copy all the data over.
RecordDesc desc_p
Holds the structure of this Record.
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
void addDataPtr(void *ptr)
Add the data pointer to the data block.
void print(std::ostream &, Int maxNrValues=25, const String &indent="") const
Print a record.
void setComment(Int whichField, const String &comment)
Set the comment for this field.
void deleteDataField(DataType type, void *ptr, void *vecptr)
Delete a data field.
void delete_myself(uInt nfields)
Utility functions to avoid code duplication in the public member functions.
const RecordDesc & description() const
Describes the current structure of this Record.
void * get_pointer(Int whichField, DataType type) const
Used by the RecordFieldPtr classes to attach in a type-safe way to the correct field.
String: the storage and methods of handling collections of characters.
Bool conform(const RecordRep &other) const
Returns True if this and other have the same RecordDesc, other than different names for the fields...
void copyData(const RecordRep &other)
Copy all data of the Record.
void mergeField(const RecordRep &other, Int whichFieldFromOther, RecordInterface::DuplicatesFlag)
Merge a field from another record into this record.
void getData(AipsIO &os, uInt version)
Read the data of a record.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
void putDataField(AipsIO &os, DataType type, const void *ptr) const
Put a data field.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.