Field indices are zero relative, i.e. they range from 0 to nfields()-1.
Create a description with no fields.
Create a description which is a copy of other.
Replace this description with other.
Add scalar, array, sub-record, or table field. If of array type, the shape is set to [-1], which indicates a variable sized array. If of sub-record type, the sub-record is free format. Returns the number of fields in the description.
Add an array field of the indicated type. The DataType is promoted from a scalar type to an array type if necessary, e.g., TpInt ->TpArrayInt. Returns the number of fields in the description. A shape of [-1] indicates a variable shape.
Add a Record field to the description. This allows hierarchical descriptions to be developed. Returns the number of fields in the description.
Add a Table field to the description. The Table description has the
given name. Returns the number of fields in the description.
When a table is put in a record field, it is checked if the name
of its description matches this name. If this name is empty, it
matches any table description.
Note that not all record types are able to instantiate a table field. E.g. TableRecord can instantiate it, while Record cannot and throws an exception when a record description containing a table field is used.
Get the comment for this field.
Set the comment for this field.
Set the shape for this field. An exception will be thrown if the field is no array.
Merge a single field from other. If allowDuplicates is True, silently throw away fields if one with the same name and type already exists, otherwise an exception is thrown. Conflicting types always cause an exception. Returns the number of fields in the description.
Add all the fields from another RecordDesc to the current objects. It returns the new number of fields.
Remove the given field from the description. It returns the new number of fields.
Rename the given field.
Returns the index of the field named fieldName. Returns -1 if fieldName does not exist.
Number of fields in the description.
What is the type of the given field. Returns TpRecord if the field is a sub-Record.
What is the name of the given field.
Create a name for a field defined by index as *i (similar to glish). It takes care that the resulting name is unique by adding a suffix _j when needed.
Make the given name unique by adding a suffix _j when needed. j is the minimal number needed to make it unique.
Returns True if whichField is an array.
Returns True if whichField is a scalar.
Returns True if whichField is a sub-record.
Returns True if whichField is a table.
What is the shape of the given field. Returns [1] if the field is a scalar, table or, sub-record, [-1] if it is a variable length array, and the actual shape for a fixed length array.
What is the name of the table description. Returns an empty string when the field is no table.
If whichField is a sub-record return its description. Otherwise an exception is thrown. The non-const version is named differently to prevent accidental use of the non-const version.
This and other compare equal if the field types and shapes are identical
(recursively if there are described sub-records).
The field names are not used.
Use function isEqual if names are important, but order is not.
Test if this description conforms the other.
It is NOT doing it recursively, thus is does not check if
sub-records are conforming.
This is used by Record, to see if another record can be assigned
to this record.
Test if this description equals another one.
It is equal if the number of fields is equal and all field names in
this description occur in the other too. The order of the fields
is not important.
The flag equalDataTypes is set to True if the data types
of all fields match.
Use function operator== if order and types are important,
but names are not.
Test if this description is a subset of another one. It is similar to isEqual above.
Test if this description is a strict subset of another one, thus if it is a subset and not equal.
Test if this description is a superset of another one.
Test if this description is a strict superset of another one, thus if it is a superset and not equal.
Test if the set of field names in this and other record description is disjoint (i.e. if they do not share names).