/** ** \file type/field.hh ** \brief The class Field (of a record type). */ #pragma once #include #include #include namespace type { /** \brief The base type for Record fields. ** ** Very much like Named, but it is *not* a Type. */ class Field { public: /** \name Ctor & dtor. ** \{ */ /** \brief Construct a Field. ** \param name field's identifier. ** \param type field's type. */ Field(misc::symbol name, const Type& type); /** \} */ /** \name Accessors. ** \{ */ /// Return the field's name. misc::symbol name_get() const; /// Return the field's type. const Type& type_get() const; /** \} */ protected: /// Field's identifier. misc::symbol name_; /// Field's type. const Type& type_; }; } // namespace type #include