.. include:: ../../toolkit-substitutions

.. oe:namespace:: OEDataFlow

.. attention::

   |TWOLANGUAGE|

..  _OEDataFlow_OEFieldType:

.. meta::
   :keywords: OEFieldType, OEField, OERecord, datarecord

.. oe:language:: c++

   .. oe:class:: OEFieldType
   
      .. oe:api::
   
         template<class T> class OEFieldType
   
      The :ref:`OEFieldType <OEDataFlow_OEFieldType>` class is a templated
      class used to construct :ref:`OEField <OEDataFlow_OEField>`
      objects for interacting with :ref:`OERecord <OEDataFlow_OERecord>` s.
   
      .. ################################################################
         # Constructor
         ################################################################
   
      .. oe:method:: Constructor
   
         .. oe:api::

            template <class T> OEFieldType<T> ()

      Generally, OEFieldType objects are not constructed directly, but
      are used from the :oe:constns:`OEDataFlow::Types` namespace.
   
      .. ################################################################
         #
         ################################################################
   
      .. oe:method:: GetName
   
         .. oe:api::

            std::string GetName() const

         Returns the name of this field type.
   
         .. seealso::
   
            * :ref:`OEField <OEDataFlow_OEField>`
            * :ref:`OERecord <OEDataFlow_OERecord>`
            * :oe:constns:`OEDataFlow::Types`
   
      .. oe:method:: ToBytes
   
         .. oe:api::

            static OEBytes ToBytes(const T& val)

         Returns the binary representation of the value *val*.
   
   
      .. oe:method:: FromBytes
   
         .. oe:api::

            static bool FromBytes(T& val, const OEBytes& data)

         Returns true if a T value can be read from the provided bytes.
   
.. oe:language:: python

    .. _OEDataFlow_OEFieldTypeHandler:

.. oe:class:: OEFieldTypeHandler
   
      .. oe:api::
   
         class OEFieldTypeHandler
   
      The :ref:`OEFieldTypeHandler <OEDataFlow_OEFieldTypeHandler>` class is a
      base class for field types. OEFieldTypeHandler objects are not constructed
      by users, but specific handlers are found in the 
      :oe:constns:`OEDataFlow::Types` namespace.
   
      .. ################################################################
         #
         ################################################################
   
      .. oe:method:: get_name
   
         .. oe:api::

            get_name() -> str

         Returns the name of this field type.
   
         .. seealso::
   
            * :ref:`OEField <OEDataFlow_OEField>`
            * :ref:`OERecord <OEDataFlow_OERecord>`
            * :oe:constns:`OEDataFlow::Types`
  

      .. oe:method:: isPOD
   
         .. oe:api::

            isPOD() -> bool

         Returns true if the data type represents a simple "plain
         old data" type.
  
      .. oe:method:: is_cacheable

         .. oe:api::

            is_cacheable() -> bool

         Returns true if the data type can be cached on an
         :ref:`OERecord <OEDataFlow_OERecord>` object.
  
