forked from ROMEO/nexosim
Finalize the Context and BuildContext API
The API style is now more uniform: both are passed by mutable ref, and only expose accessors. Additionally, the methods that were initially accessed through the scheduler field are now directly implemented on `Context`.
This commit is contained in:
@ -69,10 +69,10 @@
|
||||
//! impl ProtoModel for ProtoParentModel {
|
||||
//! type Model = ParentModel;
|
||||
//!
|
||||
//! fn build(self, ctx: &mut BuildContext<Self>) -> ParentModel {
|
||||
//! fn build(self, cx: &mut BuildContext<Self>) -> ParentModel {
|
||||
//! let mut child = ChildModel::new(self.output.clone());
|
||||
//!
|
||||
//! ctx.add_submodel(child, Mailbox::new(), "child");
|
||||
//! cx.add_submodel(child, Mailbox::new(), "child");
|
||||
//!
|
||||
//! ParentModel { output: self.output }
|
||||
//! }
|
||||
|
Reference in New Issue
Block a user