zerodds_ccm/lib.rs
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2026 ZeroDDS Contributors
3
4//! OMG CCM 4.0 — CORBA Component Model.
5//!
6//! Crate `zerodds-ccm`. Safety classification: **STANDARD**.
7//! Spec `formal/06-04-01` (`docs/standards/cache/omg/ccm-4.0.pdf`).
8//!
9//! # Scope
10//!
11//! Diese Crate implementiert den **Equivalent-IDL-Transformations-
12//! Anteil** der CCM-4.0-Spec aus §6 (Component Model). Eingabe ist ein
13//! `zerodds_idl::ast::ComponentDef` / `HomeDef` / `EventDef`; Ausgabe sind
14//! die Spec-konformen `interface`-/`valuetype`-Definitionen, die ein
15//! IDL-Compiler "implicitly defines" laut Spec §6.3.2 / §6.4.1 /
16//! §6.5.1 / §6.6.x / §6.7.1.
17//!
18//! Plus Modelle der `Components::*`-Core-Types (CCMObject, Cookie,
19//! ConnectionDescription, Navigation/Receptacles/Events-Interfaces) als
20//! Rust-Structs / -Enums, damit Caller darauf direkt referenzieren
21//! koennen.
22//!
23//! Plus Lightweight CCM Profile (§13) — Filter-Funktion, die den
24//! Equivalent-IDL-Output auf das LwCCM-Subset reduziert.
25//!
26//! # Was nicht abgedeckt ist
27//!
28//! Die folgenden Spec-Kapitel verlangen einen **CORBA-ORB** + **CCM-
29//! Container** und sind in ZeroDDS bewusst `n/a` (Begruendung im
30//! Audit-File `docs/spec-coverage/omg-ccm-4.0.md`):
31//! * §7 CIDL Syntax + Semantics — Component Implementation Definition
32//! Language; targets §8 CIF.
33//! * §8 CCM Implementation Framework — Servant-/Skeleton-Generator,
34//! verlangt POA + ORB.
35//! * §9 Container Programming Model — Server-Programming-Environment,
36//! verlangt CORBA-ORB.
37//! * §10 Integrating with Enterprise JavaBeans — verlangt EJB-
38//! Container.
39//! * §11 Interface Repository Metamodel — verlangt CORBA-IFR.
40//! * §12 CIF Metamodel — Implementation-Framework-MOF-Modell.
41//! * §14 Deployment PSM for CCM — D&C-Subsystem (formal/2006-04-02).
42//! * §15 Deployment IDL — Bestandteil von §14.
43//! * §16 XML Schema for CCM — XSD-Schema des Deployment-Subsystems.
44//!
45//! # Beispiel
46//!
47//! ```
48//! use zerodds_ccm::Cookie;
49//!
50//! let c = Cookie::new(vec![0x01, 0x02, 0x03]);
51//! assert_eq!(c.cookie_value, vec![0x01, 0x02, 0x03]);
52//! // Spec §6.5.2.4: Truncation auf Base behaelt cookieValue.
53//! assert_eq!(c.truncate_to_base().cookie_value, c.cookie_value);
54//! ```
55
56#![forbid(unsafe_code)]
57#![warn(missing_docs)]
58
59extern crate alloc;
60
61pub mod dds4ccm;
62pub mod lightweight;
63pub mod model;
64pub mod transform;
65pub mod validate;
66
67pub use lightweight::{LightweightFilterError, filter_to_lightweight};
68pub use model::{Cookie, FailureReason, FeatureName, RepositoryId};
69pub use transform::{
70 ComponentEquivalent, EventTypeEquivalent, HomeEquivalent, scoped_name, transform_component,
71 transform_event_type, transform_home,
72};
73pub use validate::{InitOp, PrimaryKeyError, apply_factory_finder_body, validate_primary_key};