..
  SPDX-License-Identifier: CC-BY-4.0
  Copyright Contributors to the OpenColorIO Project.
  Do not edit! This file was automatically generated by share/docs/frozendoc.py.

.. py:class:: FormatMetadata
   :module: PyOpenColorIO

   The :ref:`FormatMetadata` class is intended to be a generic container to hold metadata from various file formats.

   This class provides a hierarchical metadata container. A metadata object is similar to an element in XML. The top level element is named "ROOT" and can't be renamed. Several transforms have a :ref:`FormatMetadata`. The root element and all of the sub-elements may contain:
   - A name string (e.g. "ROOT", "Description"...). Name can't be empty.
   - A value string (e.g. "updated viewing LUT"). Value can be empty.
   - A list of attributes (name, value) string pairs (e.g. "version", "1.5"). There are helper functions to get and set "id" and "name" attributes. Attribute names are unique.
   - And a list of child sub-elements, which are also objects implementing :ref:`FormatMetadata`. There can be several sub-elements with the same name.


   .. py:method:: FormatMetadata.__contains__(self: PyOpenColorIO.FormatMetadata, name: str) -> bool
      :module: PyOpenColorIO


   .. py:method:: FormatMetadata.__getitem__(self: PyOpenColorIO.FormatMetadata, name: str) -> str
      :module: PyOpenColorIO

      Get the value of a attribute ("" if attribute does not exist).


   .. py:method:: FormatMetadata.__init__(*args, **kwargs)
      :module: PyOpenColorIO


   .. py:method:: FormatMetadata.__iter__(self: PyOpenColorIO.FormatMetadata) -> PyOpenColorIO.FormatMetadata.AttributeNameIterator
      :module: PyOpenColorIO


   .. py:method:: FormatMetadata.__len__(self: PyOpenColorIO.FormatMetadata) -> int
      :module: PyOpenColorIO


   .. py:method:: FormatMetadata.__setitem__(self: PyOpenColorIO.FormatMetadata, name: str, value: str) -> None
      :module: PyOpenColorIO

      Add an attribute with a given name and value. If an attribute with the same name already exists, its value is replaced. Throw if name is NULL or empty.


   .. py:method:: FormatMetadata.addChildElement(self: PyOpenColorIO.FormatMetadata, name: str, value: str) -> None
      :module: PyOpenColorIO

      Add a child element with a given name and value.

      Name has to be non-empty. Value may be empty, particularly if this element will have children. Element is added after all existing children. Use getChildElement(getNumChildrenElements()-1) to access the added element.


   .. py:method:: FormatMetadata.clear(self: PyOpenColorIO.FormatMetadata) -> None
      :module: PyOpenColorIO

      Remove all children, all attributes and the value.


   .. py:method:: FormatMetadata.getAttributes(self: PyOpenColorIO.FormatMetadata) -> PyOpenColorIO.FormatMetadata.AttributeIterator
      :module: PyOpenColorIO


   .. py:method:: FormatMetadata.getChildElements(self: PyOpenColorIO.FormatMetadata) -> PyOpenColorIO.FormatMetadata.ChildElementIterator
      :module: PyOpenColorIO


   .. py:method:: FormatMetadata.getElementName(self: PyOpenColorIO.FormatMetadata) -> str
      :module: PyOpenColorIO


   .. py:method:: FormatMetadata.getElementValue(self: PyOpenColorIO.FormatMetadata) -> str
      :module: PyOpenColorIO


   .. py:method:: FormatMetadata.getID(self: PyOpenColorIO.FormatMetadata) -> str
      :module: PyOpenColorIO

      Convenience method to easily get/set the 'id' attribute. This corresponds to the ProcessNode id attribute from a CLF/CTF file or the ColorCorrection id attribute from a CC/CCC/CDL file.


   .. py:method:: FormatMetadata.getName(self: PyOpenColorIO.FormatMetadata) -> str
      :module: PyOpenColorIO

      Convenience method to easily get/set the 'name' attribute. This corresponds to the ProcessNode name attribute from a CLF / CTF file or the name key of a transform in the config YAML.


   .. py:method:: FormatMetadata.setElementName(self: PyOpenColorIO.FormatMetadata, name: str) -> None
      :module: PyOpenColorIO

      Name has to be a non-empty string. Top-level element can't be renamed. 'ROOT' is reserved.


   .. py:method:: FormatMetadata.setElementValue(self: PyOpenColorIO.FormatMetadata, value: str) -> None
      :module: PyOpenColorIO


   .. py:method:: FormatMetadata.setID(self: PyOpenColorIO.FormatMetadata, id: str) -> None
      :module: PyOpenColorIO


   .. py:method:: FormatMetadata.setName(self: PyOpenColorIO.FormatMetadata, name: str) -> None
      :module: PyOpenColorIO


.. py:class:: AttributeNameIterator
   :module: PyOpenColorIO.FormatMetadata


   .. py:method:: AttributeNameIterator.__getitem__(self: PyOpenColorIO.FormatMetadata.AttributeNameIterator, arg0: int) -> str
      :module: PyOpenColorIO.FormatMetadata


   .. py:method:: AttributeNameIterator.__iter__(self: PyOpenColorIO.FormatMetadata.AttributeNameIterator) -> PyOpenColorIO.FormatMetadata.AttributeNameIterator
      :module: PyOpenColorIO.FormatMetadata


   .. py:method:: AttributeNameIterator.__len__(self: PyOpenColorIO.FormatMetadata.AttributeNameIterator) -> int
      :module: PyOpenColorIO.FormatMetadata


   .. py:method:: AttributeNameIterator.__next__(self: PyOpenColorIO.FormatMetadata.AttributeNameIterator) -> str
      :module: PyOpenColorIO.FormatMetadata


.. py:class:: AttributeIterator
   :module: PyOpenColorIO.FormatMetadata


   .. py:method:: AttributeIterator.__getitem__(self: PyOpenColorIO.FormatMetadata.AttributeIterator, arg0: int) -> tuple
      :module: PyOpenColorIO.FormatMetadata


   .. py:method:: AttributeIterator.__iter__(self: PyOpenColorIO.FormatMetadata.AttributeIterator) -> PyOpenColorIO.FormatMetadata.AttributeIterator
      :module: PyOpenColorIO.FormatMetadata


   .. py:method:: AttributeIterator.__len__(self: PyOpenColorIO.FormatMetadata.AttributeIterator) -> int
      :module: PyOpenColorIO.FormatMetadata


   .. py:method:: AttributeIterator.__next__(self: PyOpenColorIO.FormatMetadata.AttributeIterator) -> tuple
      :module: PyOpenColorIO.FormatMetadata


.. py:class:: ConstChildElementIterator
   :module: PyOpenColorIO.FormatMetadata


   .. py:method:: ConstChildElementIterator.__getitem__(self: PyOpenColorIO.FormatMetadata.ConstChildElementIterator, arg0: int) -> PyOpenColorIO.FormatMetadata
      :module: PyOpenColorIO.FormatMetadata


   .. py:method:: ConstChildElementIterator.__iter__(self: PyOpenColorIO.FormatMetadata.ConstChildElementIterator) -> PyOpenColorIO.FormatMetadata.ConstChildElementIterator
      :module: PyOpenColorIO.FormatMetadata


   .. py:method:: ConstChildElementIterator.__len__(self: PyOpenColorIO.FormatMetadata.ConstChildElementIterator) -> int
      :module: PyOpenColorIO.FormatMetadata


   .. py:method:: ConstChildElementIterator.__next__(self: PyOpenColorIO.FormatMetadata.ConstChildElementIterator) -> PyOpenColorIO.FormatMetadata
      :module: PyOpenColorIO.FormatMetadata


.. py:class:: ChildElementIterator
   :module: PyOpenColorIO.FormatMetadata


   .. py:method:: ChildElementIterator.__getitem__(self: PyOpenColorIO.FormatMetadata.ChildElementIterator, arg0: int) -> PyOpenColorIO.FormatMetadata
      :module: PyOpenColorIO.FormatMetadata


   .. py:method:: ChildElementIterator.__iter__(self: PyOpenColorIO.FormatMetadata.ChildElementIterator) -> PyOpenColorIO.FormatMetadata.ChildElementIterator
      :module: PyOpenColorIO.FormatMetadata


   .. py:method:: ChildElementIterator.__len__(self: PyOpenColorIO.FormatMetadata.ChildElementIterator) -> int
      :module: PyOpenColorIO.FormatMetadata


   .. py:method:: ChildElementIterator.__next__(self: PyOpenColorIO.FormatMetadata.ChildElementIterator) -> PyOpenColorIO.FormatMetadata
      :module: PyOpenColorIO.FormatMetadata

