.. _class: Classes ======= Field class ----------- .. autosummary:: :nosignatures: :toctree: ~cf.Field Field component classes ----------------------- .. autosummary:: :nosignatures: :toctree: generated/ ~cf.CellMeasures ~cf.CellMethods ~cf.Coordinate ~cf.CoordinateBounds ~cf.Data ~cf.Flags ~cf.Space ~cf.Transform ~cf.Units Miscellaneous classes --------------------- .. autosummary:: :nosignatures: :toctree: generated/ ~cf.Comparison ~cf.CoordinateList ~cf.FieldList Base classes ------------ .. autosummary:: :nosignatures: :toctree: generated/ ~cf.CfList ~cf.CfDict ~cf.Variable ~cf.VariableList .. _inheritance_diagrams: Inheritance diagrams -------------------- The classes defined by the cf package inherit as follows. ---- Classes :class:`.Data`, :class:`.Units`, :class:`.Flags` and :class:`.Variable` all inherit directly from the built-in :func:`object()`. Classes :class:`.Field`, :class:`.Coordinate`, :class:`.CoordinateBounds` and :class:`.CellMeasures` are all sub-classes of :class:`.Variable`: .. image:: images/object.png .. To reproduce the inheritance diagram, uncomment this .. inheritance-diagram:: cf.Flags cf.Data cf.Units cf.Coordinate cf.CoordinateBounds cf.CellMeasures cf.Field :parts: 1 ---- Classes :class:`.CfList`, :class:`.VariableList`, :class:`.FieldList`, :class:`.CoordinateList` and :class:`.CellMethods` are list-like objects and inherit the built-in :class:`~collections.MutableSequence` abstract base class: .. image:: images/CfList.png .. To reproduce the inheritance diagram, uncomment this .. inheritance-diagram:: cf.FieldList cf.CoordinateList cf.CellMethods :parts: 1 This inheritance diagram shows, for example, that a :class:`.FieldList` object is an iterable [1]_ which supports efficient element access using integer indices and defines a ``len()`` method that returns the length of the sequence. ---- Classes :class:`.CfDict`, :class:`.Space` and :class:`.Transform` are dictionary-like objects and inherit the built-in :class:`~collections.MutableMapping` abstract base class. .. image:: images/CfDict.png .. To reproduce the inheritance diagram, uncomment this .. inheritance-diagram:: cf.Space cf.Transform :parts: 1 ---- .. rubric:: Footnotes .. [1] An object capable of returning its members one at a time.