#![cfg_attr(not(feature = "std"), no_std)]
#![forbid(unsafe_code)]
#![warn(missing_docs)]
#[cfg(feature = "alloc")]
extern crate alloc;
pub mod cidl;
pub mod cif;
pub mod component_def;
pub mod context;
pub mod dynamic_api;
pub mod home;
pub mod orb_extensions;
pub mod port;
#[cfg(feature = "std")]
pub mod container;
#[cfg(all(feature = "std", feature = "cos-event"))]
pub mod cos_event_bridge;
#[cfg(feature = "std")]
pub mod lifecycle;
#[cfg(feature = "std")]
pub mod orb_core;
#[cfg(feature = "std")]
pub mod pss;
#[cfg(feature = "std")]
pub mod time_psm;
#[cfg(feature = "std")]
pub mod timer;
pub use cidl::{Composition, HomeExecutor, StorageHome, StorageType};
pub use cif::{ComponentExecutor, ExecutorLocator, KeyedExecutor, SessionExecutor};
pub use component_def::{
AttributeDef, ComponentDef, EventSinkDef, EventSourceDef, FacetDef, ReceptacleDef,
};
pub use context::ComponentContext;
pub use home::{HomeDef, HomeFinder};
pub use port::{ConnectionId, EventStream, PortRegistry};
#[cfg(feature = "std")]
pub use container::{Container, ContainerError, ContainerType, LifecycleState};
#[cfg(all(feature = "std", feature = "cos-event"))]
pub use cos_event_bridge::EventChannelTimerCallback;
#[cfg(feature = "std")]
pub use timer::{TimerEventService, TimerHandle, TimerKind};
pub mod conformance {
pub const CCM_CONFORMANCE_BASIC_LEVEL: &str = "OMG-CCM-4.0:Basic";
pub const CCM_CONFORMANCE_BASIC_LEVEL_JAVA: &str = "OMG-CCM-4.0:BasicJava";
pub const LIGHTWEIGHT_CCM_LEVEL: &str = "OMG-CCM-4.0:Lightweight";
pub const LWCCM_RESTRICTIONS_ENFORCED: &str = "OMG-CCM-4.0:LwCCM-Restrictions";
pub const LWCCM_FILTER_ACTIVE: &str = "OMG-CCM-4.0:LwCCM-Filter";
pub const CORBA_PART3_6_13_CCM_CONFORMANCE: &str = "OMG-CORBA-3.3-P3:6.13-CCM-Conformance";
pub const CORBA_PART3_7_GENERIC_INTERACTION: &str = "OMG-CORBA-3.3-P3:7-Generic-Interaction";
pub const CORBA_PART3_14_LIGHTWEIGHT_CCM_PROFILE: &str = "OMG-CORBA-3.3-P3:14-LwCCM-Profile";
pub const CORBA_PART2_10_6_CSIV2_LEVEL_0: &str = "OMG-CORBA-3.3-P2:10.6-CSIv2-L0";
pub const CORBA_PART2_10_6_CSIV2_LEVEL_1: &str = "OMG-CORBA-3.3-P2:10.6-CSIv2-L1";
pub const CORBA_PART2_10_6_CSIV2_LEVEL_2: &str = "OMG-CORBA-3.3-P2:10.6-CSIv2-L2";
pub const CCM_OPTIONAL_EXTENDED_LEVEL: &str = "OMG-CCM-4.0:Optional-Extended";
pub const CCM_ORB_VENDOR_STUB: &str = "OMG-CCM-4.0:ORB-Vendor-Stub";
}
#[cfg(test)]
mod conformance_tests {
use super::conformance::*;
#[test]
fn ccm_conformance_basic_level_marker_matches_spec() {
assert_eq!(CCM_CONFORMANCE_BASIC_LEVEL, "OMG-CCM-4.0:Basic");
}
#[test]
fn ccm_conformance_basic_level_java_marker_matches_spec() {
assert_eq!(CCM_CONFORMANCE_BASIC_LEVEL_JAVA, "OMG-CCM-4.0:BasicJava");
}
#[test]
fn lightweight_ccm_level_marker_matches_spec() {
assert_eq!(LIGHTWEIGHT_CCM_LEVEL, "OMG-CCM-4.0:Lightweight");
}
#[test]
fn lwccm_restrictions_marker_matches_spec() {
assert_eq!(
LWCCM_RESTRICTIONS_ENFORCED,
"OMG-CCM-4.0:LwCCM-Restrictions"
);
}
#[test]
fn lwccm_filter_marker_matches_spec() {
assert_eq!(LWCCM_FILTER_ACTIVE, "OMG-CCM-4.0:LwCCM-Filter");
}
#[test]
fn all_markers_are_distinct() {
let markers = [
CCM_CONFORMANCE_BASIC_LEVEL,
CCM_CONFORMANCE_BASIC_LEVEL_JAVA,
LIGHTWEIGHT_CCM_LEVEL,
LWCCM_RESTRICTIONS_ENFORCED,
LWCCM_FILTER_ACTIVE,
CORBA_PART3_6_13_CCM_CONFORMANCE,
CORBA_PART3_7_GENERIC_INTERACTION,
CORBA_PART3_14_LIGHTWEIGHT_CCM_PROFILE,
CORBA_PART2_10_6_CSIV2_LEVEL_0,
CORBA_PART2_10_6_CSIV2_LEVEL_1,
CORBA_PART2_10_6_CSIV2_LEVEL_2,
];
let mut seen = std::collections::HashSet::new();
for m in markers {
assert!(seen.insert(m), "duplicate marker: {m}");
}
}
#[test]
fn corba_part3_6_13_marker_namespace() {
assert!(CORBA_PART3_6_13_CCM_CONFORMANCE.starts_with("OMG-CORBA-3.3-P3:"));
}
#[test]
fn corba_part3_7_marker_namespace() {
assert!(CORBA_PART3_7_GENERIC_INTERACTION.starts_with("OMG-CORBA-3.3-P3:"));
}
#[test]
fn corba_part3_14_marker_namespace() {
assert!(CORBA_PART3_14_LIGHTWEIGHT_CCM_PROFILE.starts_with("OMG-CORBA-3.3-P3:"));
}
#[test]
fn csiv2_level_markers_match_spec() {
assert_eq!(
CORBA_PART2_10_6_CSIV2_LEVEL_0,
"OMG-CORBA-3.3-P2:10.6-CSIv2-L0"
);
assert_eq!(
CORBA_PART2_10_6_CSIV2_LEVEL_1,
"OMG-CORBA-3.3-P2:10.6-CSIv2-L1"
);
assert_eq!(
CORBA_PART2_10_6_CSIV2_LEVEL_2,
"OMG-CORBA-3.3-P2:10.6-CSIv2-L2"
);
}
}