2 #ifndef AFW_TABLE_Field_h_INCLUDED 3 #define AFW_TABLE_Field_h_INCLUDED 47 Field(std::string
const&
name, std::string
const& doc, std::string
const& units =
"",
49 :
FieldBase<T>(size), _name(name), _doc(doc), _units(units) {}
68 :
FieldBase<T>(size), _name(name), _doc(doc), _units() {}
71 std::string
const&
getName()
const {
return _name; }
74 std::string
const&
getDoc()
const {
return _doc; }
77 std::string
const&
getUnits()
const {
return _units; }
80 inline friend std::ostream& operator<<(std::ostream& os, Field<T>
const&
field) {
82 if (!
field.getDoc().empty()) os <<
", doc=\"" <<
field.getDoc() <<
"\"";
83 if (!
field.getUnits().empty()) os <<
", units=\"" <<
field.getUnits() <<
"\"";
102 #endif // !AFW_TABLE_Field_h_INCLUDED Field base class default implementation (used for numeric scalars and Angle).
std::string const & getName() const
Return the name of the field.
Field(std::string const &name, std::string const &doc, FieldBase< T > const &size)
Construct a new field.
A base class for image defects.
Field< T > copyRenamed(std::string const &newName) const
Return a new Field with a new name and other properties the same as this.
A description of a field in a table.
table::Key< std::string > name
Field(std::string const &name, std::string const &doc, std::string const &units="", FieldBase< T > const &size=FieldBase< T >())
Construct a new field.
T Element
the type of subfields (the same as the type itself for scalars)
std::string const & getDoc() const
Return the documentation for the field.
std::string const & getUnits() const
Return the units for the field.
FieldBase< T >::Element Element
Type used to store field data in the table (a field may have multiple elements).
static std::string getTypeString()
Return a string description of the field type.