use crate::domain::DomainId;
use super::{Representation, Shape};
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum ObjectKind {
Tensor,
Section,
Sheaf,
Complex,
Morphism,
BundleLike,
GraphObject,
Scalar,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct Invariant {
pub description: String,
}
impl Invariant {
pub fn new(description: impl Into<String>) -> Self {
Self {
description: description.into(),
}
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct ObjectMeta {
pub object_kind: ObjectKind,
pub domain: DomainId,
pub shape: Shape,
pub representation: Representation,
pub invariants: Vec<Invariant>,
}
impl ObjectMeta {
pub fn tensor(domain: DomainId, shape: Shape, representation: Representation) -> Self {
Self {
object_kind: ObjectKind::Tensor,
domain,
shape,
representation,
invariants: Vec::new(),
}
}
}