pycopancore.private._abstract_entity_mixin module

_abstract_entity_mixin class.

It sets the basic structure of entity mixins (individuals, cells , social_systems).

exception StatusError[source]

Bases: Exception

Define Error.

This Error is states, that an entity is neither active nor deactivated

class _AbstractEntityMixin(*args, **kwargs)[source]

Bases: DUMMY

Define _AbstractEntityMixin.

Entity-unspecific abstract class from which all entity-specific abstract mixin classes are derived.

NEXTUID = 0
deactivate()[source]

Deactivate entity.

Remove Entity from its classes entities list and add it to its classes idle_entities list.

delete()[source]

Delete entity from all lists.

classmethod get_next_uid()[source]

Generate UIDs (Unique identifier).

Returns:

current_uid – the current uid

Return type:

int

idle_entities = None
property is_active

Check if entity is active.

In other words, check if entity is in self.__class__.instances

reactivate()[source]

Reactivate entity.

Remove Entity from its classes idle_entities list and add it to its classes entities list.