Template Struct Field

Inheritance Relationships

Base Type

Struct Documentation

template<typename T>
struct Field : public lsst::afw::table::FieldBase<T>

A description of a field in a table.

Field combines a type with the field name, documentation, units, and in some cases, the size of the field.

Specializations for different field types are inherited through FieldBase; see the documentation for those specializations for additional information about particular field types.

Public Types

typedef FieldBase<T>::Element Element

Type used to store field data in the table (a field may have multiple elements).

Public Functions

Field(std::string const &name, std::string const &doc, std::string const &units = "", FieldBase<T> const &size = FieldBase<T>())

Construct a new field.

Parameters
  • [in] name: Name of the field. Schemas provide extra functionality for names whose components are separated by underscores. Field names should be limited to letters, numbers, and underscores.

  • [in] doc: Documentation for the field. Should not contain single-quotes to avoid FITS round-trip problems.

  • [in] units: Units for the field. Should not contain single-quotes to avoid FITS round-trip problems.

  • [in] size: Size of the field as an integer, if appropriate. Field types that accept a size have a FieldBase that is implicitly constructable from an integer, so the argument type should be considered to effectively be int; using FieldBase here allows use to throw when the signature does not match the field type.

Field(std::string const &name, std::string const &doc, FieldBase<T> const &size)

Construct a new field.

Parameters
  • [in] name: Name of the field. Schemas provide extra functionality for names whose components are separated by underscores. Field names should be limited to letters, numbers, and underscores.

  • [in] doc: Documentation for the field.

  • [in] size: Size of the field as an integer, if appropriate. Field types that accept a size have a FieldBase that is implicitly constructable from an integer, so the argument type should be considered to effectively be int; using FieldBase here allows use to throw when the signature does not match the field type.

Field(Field const&)
Field(Field&&)
Field &operator=(Field const&)
Field &operator=(Field&&)
~Field()
std::string const &getName() const

Return the name of the field.

std::string const &getDoc() const

Return the documentation for the field.

std::string const &getUnits() const

Return the units for the field.

Field<T> copyRenamed(std::string const &newName) const

Return a new Field with a new name and other properties the same as this.

Friends

std::ostream &operator<<(std::ostream &os, Field<T> const &field)

Stringification.