# Path: djangoevents/utils_abstract.py
# def abstract(cls):
#     """
#     Decorator marking classes as abstract.
# 
#     The "abstract" mark is an internal tag.  Classes can be checked for
#     being abstract with the `is_abstract` function.  The tag is non
#     inheritable: every class or subclass has to be explicitly marked
#     with the decorator to be considered abstract.
#     """
# 
#     _abstract_classes.add(cls)
#     return cls
# 
# Path: djangoevents/utils_abstract.py
# def is_abstract(cls):
#     return cls in _abstract_classes


import warnings
from djangoevents.utils_abstract import abstract
from djangoevents.utils_abstract import is_abstract
from eventsourcing.domain.model.entity import DomainEvent
from eventsourcing.domain.model.entity import EventSourcedEntity



@abstract
class BaseAggregate(EventSourcedEntity):
    """
    `EventSourcedEntity` with saner mutator routing & naming:

    >>> class Asset(BaseAggregate):
    >>>    class Created(BaseAggregate.Created):
    >>>        def mutate(event, klass):
    >>>            return klass(...)
    >>>
    >>>    class Updated(DomainEvent):
    >>>        def mutate(event, instance):
    >>>            instance.connect = True
    >>>            return instance
    """

    @classmethod
    def is_abstract_class(cls):

# Path: djangoevents/utils_abstract.py
# def abstract(cls):
#     """
#     Decorator marking classes as abstract.
# 
#     The "abstract" mark is an internal tag.  Classes can be checked for
#     being abstract with the `is_abstract` function.  The tag is non
#     inheritable: every class or subclass has to be explicitly marked
#     with the decorator to be considered abstract.
#     """
# 
#     _abstract_classes.add(cls)
#     return cls
# 
# Path: djangoevents/utils_abstract.py
# def is_abstract(cls):
#     return cls in _abstract_classes


# Path: djangoevents/domain.py
import warnings
from djangoevents.utils_abstract import abstract
from djangoevents.utils_abstract import is_abstract
from eventsourcing.domain.model.entity import DomainEvent
from eventsourcing.domain.model.entity import EventSourcedEntity




@abstract
class BaseAggregate(EventSourcedEntity):
    """
    `EventSourcedEntity` with saner mutator routing & naming:

    >>> class Asset(BaseAggregate):
    >>>    class Created(BaseAggregate.Created):
    >>>        def mutate(event, klass):
    >>>            return klass(...)
    >>>
    >>>    class Updated(DomainEvent):
    >>>        def mutate(event, instance):
    >>>            instance.connect = True
    >>>            return instance
    """

    @classmethod
    def is_abstract_class(cls):

        return is_abstract(cls)