.. oe:namespace:: OEDataFlow

..  _OEDataFlow_OEMakeField:

.. meta::
   :keywords: OEMakeField OERecord datarecord

.. oe:language:: c++

   .. oe:function:: OEMakeField
   
      .. oe:api::
   
         template<typename T> OEField<T> OEMakeField(const std::string& name,
                                                     const OEFieldType<T>& t,
                                                     OEFieldMeta meta = OEFieldMeta(),
                                                     bool readonly = false,
                                                     bool nullable = false)
   
         template<type T>OEMakeField(const std::string& name,
                                     const OEVectorFieldType<T>& t,
                                     OEFieldMeta meta = OEFieldMeta(),
                                     bool readonly = false,
                                     bool nullable = false)
   
      Creates an :ref:`OEField <OEDataFlow_OEField>` object to be
      used for adding data to, or retrieving data from, an 
      :ref:`OERecord <OEDataFlow_OERecord>` object.
   
      name
        The name the field will be given.
   
      t
        This specifies the type of field to be created. This will usually
        come from the :oe:constns:`OEDataFlow::Types` namespace.
   
      meta
        Optional metadata to be applied to the field.
   
      readonly
        If true, the field can only be used to read data to a record, not
        write it.
   
      nullable
        If true, the field will allow setting of null values on a record.
   
      .. seealso::
   
         * :ref:`OEField <OEDataFlow_OEField>`
         * :ref:`OERecord <OEDataFlow_OERecord>`
         * :ref:`OEFieldMeta <OEDataFlow_OEFieldMeta>`
   
.. oe:language:: python

   .. oe:function:: OEMakeField
   
      .. oe:api::
   
         OEMakeField(name: str, t: OEFieldTypeHandler,
                     meta: OEFieldMeta = None, readonly: bool = false,
                     nullable: bool = false) -> OEField
   
      Creates an :ref:`OEField <OEDataFlow_OEField>` object to be
      used for adding data to, or retrieving data from, an 
      :ref:`OERecord <OEDataFlow_OERecord>` object.
   
      name
        The name the field will be given.
   
      t
        This specifies the type of field to be created. This will usually
        come from the :oe:constns:`OEDataFlow::Types` namespace.
   
      meta
        Optional metadata to be applied to the field.
   
      readonly
        If true, the field can only be used to read data to a record, not
        write it.
   
      nullable
        If true, the field will allow setting of null values on a record.
   
      .. seealso::
   
         * :ref:`OEField <OEDataFlow_OEField>`
         * :ref:`OERecord <OEDataFlow_OERecord>`
         * :ref:`OEFieldMeta <OEDataFlow_OEFieldMeta>`
   
