|
casacore
|
#include <RecordFieldId.h>
Public Member Functions | |
| RecordFieldId (Int fieldNumber) | |
| Construct it from a field number. | |
| RecordFieldId (const String &name) | |
| Construct it from a field name. | |
| RecordFieldId (const std::string &name) | |
| RecordFieldId (const Char *name) | |
| Int | fieldNumber () const |
| Get the field number. | |
| const String & | fieldName () const |
| Get the field name. | |
| Bool | byName () const |
| Is the id given by name? | |
Private Attributes | |
| Bool | byName_p |
| Int | number_p |
| String | name_p |
The identification of a record field.
Public interface
RecordFieldId gives the identification of a field in a record.
This class provides the user to identify a field in a record. Identification can be done by means of the field name or by means of its field number.
For the programmer the most convenient way is probably the name, because that is the natural identification. However, identification by means of field number is much faster and could be used when it is known.
This class makes it possible that many functions in Record classes have to be defined only once. The constructors of RecordFieldId make it possible that a number and a string are automatically converted, so the user does not have to instantiate a RecordFieldId object explicitly.
Definition at line 88 of file RecordFieldId.h.
|
inline |
Construct it from a field number.
Definition at line 118 of file RecordFieldId.h.
References byName_p, casacore::False, fieldNumber(), and number_p.
|
inline |
Construct it from a field name.
Definition at line 123 of file RecordFieldId.h.
References byName_p, fieldName(), name_p, number_p, and casacore::True.
|
inline |
Definition at line 129 of file RecordFieldId.h.
References byName_p, fieldName(), name_p, number_p, and casacore::True.
|
inline |
Definition at line 135 of file RecordFieldId.h.
References byName_p, fieldName(), name_p, number_p, and casacore::True.
|
inline |
|
inline |
Get the field name.
Definition at line 146 of file RecordFieldId.h.
References name_p.
Referenced by RecordFieldId(), RecordFieldId(), and RecordFieldId().
|
inline |
Get the field number.
Definition at line 141 of file RecordFieldId.h.
References number_p.
Referenced by RecordFieldId().
|
private |
Definition at line 111 of file RecordFieldId.h.
Referenced by byName(), RecordFieldId(), RecordFieldId(), RecordFieldId(), and RecordFieldId().
|
private |
Definition at line 113 of file RecordFieldId.h.
Referenced by fieldName(), RecordFieldId(), RecordFieldId(), and RecordFieldId().
|
private |
Definition at line 112 of file RecordFieldId.h.
Referenced by fieldNumber(), RecordFieldId(), RecordFieldId(), RecordFieldId(), and RecordFieldId().