FormatMetadata

Caution

API Docs are a work in progress, expect them to improve over time.

class FormatMetadata

The 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. It contains:

  • A name string (e.g. “Description”).

  • A value string (e.g. “updated viewing LUT”).

  • A list of attributes (name, value) string pairs (e.g. “version”,

“1.5”).

  • And a list of child sub-elements, which are also objects

implementing FormatMetadata.

const char *getName() const = 0
void setName(const char*) = 0
const char *getValue() const = 0
void setValue(const char*) = 0
int getNumAttributes() const = 0
const char *getAttributeName(int i) const = 0
const char *getAttributeValue(int i) const = 0
void addAttribute(const char *name, const char *value) = 0

Add an attribute with a given name and value. If an attribute with the same name already exists, the value is replaced.

int getNumChildrenElements() const = 0
const `FormatMetadata`_ &getChildElement(int i) const = 0
`FormatMetadata`_ &getChildElement(int i) = 0
`FormatMetadata`_ &addChildElement(const char *name, const char *value) = 0

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. Return a reference to the added element.

void clear() = 0
`FormatMetadata`_ &operator=(const FormatMetadata &rhs) = 0
FormatMetadata(const FormatMetadata &rhs) = delete
~FormatMetadata()
class PyOpenColorIO.FormatMetadata
class AttributeIterator
class AttributeNameIterator
class ChildElementIterator
class ConstChildElementIterator
addChildElement(self: PyOpenColorIO.FormatMetadata, name: str, value: str) → `PyOpenColorIO.FormatMetadata`_
clear(self: PyOpenColorIO.FormatMetadata) → None
getAttributes(self: PyOpenColorIO.FormatMetadata) → OpenColorIO_v2_0dev::PyIterator<OpenColorIO_v2_0dev::FormatMetadata const&, 1>
getChildElements(*args, **kwargs)

Overloaded function.

  1. getChildElements(self: PyOpenColorIO.FormatMetadata) → OpenColorIO_v2_0dev::PyIterator<OpenColorIO_v2_0dev::FormatMetadata const&, 2>
  2. getChildElements(self: PyOpenColorIO.FormatMetadata) → OpenColorIO_v2_0dev::PyIterator<OpenColorIO_v2_0dev::FormatMetadata&, 3>
getName(self: PyOpenColorIO.FormatMetadata) → str
getValue(self: PyOpenColorIO.FormatMetadata) → str
setName(self: PyOpenColorIO.FormatMetadata, name: str) → None
setValue(self: PyOpenColorIO.FormatMetadata, value: str) → None