"""
This module contains a classes used as a base for the rest of the core of aotpy.
"""
from dataclasses import dataclass
from typing import Any
__all__ = ['Referenceable', 'Coordinates', 'Metadatum']
[docs]
@dataclass
class Coordinates:
"""Contains a set of horizontal (x) and vertical (y) Cartesian coordinates in a plane."""
x: float = None
"Horizontal Cartesian coordinate."
y: float = None
"Vertical Cartesian coordinate."
[docs]
@dataclass
class Referenceable:
"""Abstract class for all classes which can be referenced via a UID."""
uid: str
"""Unique identifier of the object, which allows unambiguous referencing."""
def __post_init__(self):
if self.__class__ == Referenceable:
raise TypeError("Cannot instantiate abstract class.")