owmeta_core.mapped_class module

class owmeta_core.mapped_class.MappedClass(name, bases, dct)[source]

Bases: type

A type for MappedClasses

Sets up the graph with things needed for MappedClasses

on_mapper_add_class(mapper)[source]

Called by owmeta_core.mapper.Mapper

Registers certain properties of the class

register_on_module(module=None)[source]

“Registers” this class on a module (typically the one in which the class is defined) such that owmeta-core functions can locate it. This happens automatically when the class is defined unless the ‘unmapped’ attribute is defined and set to True.

This mechanism necessary in some cases where classes are generated dynamically or in a method and aren’t necessarily assigned to attributes on the module where they are defined.