class documentation

Singleton metaclass interface for fiftyone.core.document.Document subclasses.

The methods declared by this interface are used by the fiftyone.core.document.Document class to manage all instances of a class that implements this type.

Method _get_instance Retrieves the fiftyone.core.document.Document instance for the given document, if one exists.
Method _register_instance Registers the given instance in the weakref dictionary.
Method _reload_instance Reloads the backing document for the given instance (or view), if a reference exists to it.
def _get_instance(cls, doc): (source)

Retrieves the fiftyone.core.document.Document instance for the given document, if one exists.

Parameters
clsUndocumented
doca fiftyone.core.odm.document.Document
Returns
a fiftyone.core.document.Document instance, or None
def _register_instance(cls, obj): (source)

Registers the given instance in the weakref dictionary.

Parameters
clsUndocumented
obja Document
def _reload_instance(cls, obj): (source)

Reloads the backing document for the given instance (or view), if a reference exists to it.

Parameters
clsUndocumented
obja Document or DocumentView