Added guarded context
This commit is contained in:
@ -143,7 +143,7 @@ impl IntoIterator for RSset {
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/// Basic structure for a reaction.
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Hash)]
|
||||
pub struct RSreaction {
|
||||
pub reactants: RSset,
|
||||
pub inhibitors: RSset,
|
||||
@ -195,6 +195,10 @@ pub enum RSprocess {
|
||||
entities: RSset,
|
||||
next_process: Rc<RSprocess>,
|
||||
},
|
||||
Guarded {
|
||||
reaction: RSreaction,
|
||||
next_process: Rc<RSprocess>,
|
||||
},
|
||||
WaitEntity {
|
||||
repeat: i64,
|
||||
repeated_process: Rc<RSprocess>,
|
||||
@ -248,6 +252,12 @@ impl RSprocess {
|
||||
elements.push(entities);
|
||||
queue.push_back(next_process);
|
||||
}
|
||||
Self::Guarded { reaction, next_process } => {
|
||||
elements.push(&reaction.reactants);
|
||||
elements.push(&reaction.inhibitors);
|
||||
elements.push(&reaction.products);
|
||||
queue.push_back(next_process);
|
||||
}
|
||||
Self::WaitEntity {
|
||||
repeat: _,
|
||||
repeated_process,
|
||||
|
||||
Reference in New Issue
Block a user