openehr-lang 0.0.2

openEHR LANG 1.0.0: BMM/P_BMM object model (generated from BMM) plus a hand-written ODIN instance parser (the `odin` module — deliberately off the codegen path).
Documentation
// @generated by openehr-codegen from BMM (`BMM_GENERIC_CLASS`) — DO NOT EDIT.

//! The openEHR `BMM_GENERIC_CLASS` spec class, generated from the vendored BMM
//! meta-model.

use crate::bmm::core::bmm_class::BmmClass;
use crate::bmm::core::bmm_generic_parameter::BmmGenericParameter;
use crate::bmm::core::bmm_package::BmmPackage;
use crate::bmm::core::bmm_property::BmmProperty;
use crate::bmm::core::bmm_type::BmmType;

/// Definition of a generic class in an object model.
#[doc(alias = "BMM_GENERIC_CLASS")]
#[derive(Debug, Clone, PartialEq)]
pub struct BmmGenericClass {
    // inherited: BMM_MODEL_ELEMENT
    /// Optional documentation of this element.
    pub documentation: Option<String>,

    // inherited: BMM_CLASS
    /// Name of this class. Note that unlike UML, names of classes are just the root name, even if the class is generic.
    pub name: String,
    /// List of immediate inheritance parents.
    pub ancestors: Option<std::collections::BTreeMap<String, BmmClass>>,
    /// Package this class belongs to.
    pub package: BmmPackage,
    /// List of attributes defined in this class.
    pub properties: Option<std::collections::BTreeMap<String, BmmProperty<BmmType>>>,
    /// Reference to original source schema defining this class. Useful for UI tools to determine which original schema file to open for a given class for manual editing.
    pub source_schema_id: String,
    /// List of immediate inheritance descendants.
    pub immediate_descendants: Option<Vec<String>>,
    /// True if this class is abstract in its model.
    pub is_abstract: bool,
    /// True if this class is designated a primitive type within the overall type system of the schema.
    pub is_primitive_type: bool,
    /// True if this definition overrides a class of the same name in an included schema.
    pub is_override: bool,
    /// List of generic parameter definitions, keyed by name of generic parameter; these are defined either directly on this class or by the addition of an ancestor class which is generic.
    pub generic_parameters: std::collections::BTreeMap<String, BmmGenericParameter>,
}