ClapModel

Trait ClapModel 

Source
pub trait ClapModel {
    // Required methods
    fn do_compute(&mut self, arg_matches: &ArgMatches<'_>);
    fn do_clap_agents(
        &mut self,
        arg_matches: &ArgMatches<'_>,
        stdout: &mut dyn Write,
    ) -> bool;
    fn do_clap_conditions(
        &mut self,
        arg_matches: &ArgMatches<'_>,
        stdout: &mut dyn Write,
    ) -> bool;
    fn do_clap_compute(
        &mut self,
        arg_matches: &ArgMatches<'_>,
        stdout: &mut dyn Write,
    ) -> bool;
    fn do_clap_configurations(
        &mut self,
        arg_matches: &ArgMatches<'_>,
        stdout: &mut dyn Write,
    ) -> bool;
    fn do_clap_transitions(
        &mut self,
        arg_matches: &ArgMatches<'_>,
        stdout: &mut dyn Write,
    ) -> bool;
    fn do_clap_path(
        &mut self,
        arg_matches: &ArgMatches<'_>,
        stdout: &mut dyn Write,
    ) -> bool;
    fn do_clap_sequence(
        &mut self,
        arg_matches: &ArgMatches<'_>,
        stdout: &mut dyn Write,
    ) -> bool;
    fn do_clap_states(
        &mut self,
        arg_matches: &ArgMatches<'_>,
        stdout: &mut dyn Write,
    ) -> bool;

    // Provided method
    fn do_clap(&mut self, arg_matches: &ArgMatches<'_>, stdout: &mut dyn Write) { ... }
}
Expand description

Execute operations on a model using clap commands.

Required Methods§

Source

fn do_compute(&mut self, arg_matches: &ArgMatches<'_>)

Compute the model.

Source

fn do_clap_agents( &mut self, arg_matches: &ArgMatches<'_>, stdout: &mut dyn Write, ) -> bool

Execute the agents clap subcommand, if requested to.

This doesn’t compute the model.

Source

fn do_clap_conditions( &mut self, arg_matches: &ArgMatches<'_>, stdout: &mut dyn Write, ) -> bool

Execute the conditions clap subcommand, if requested to.

This doesn’t compute the model.

Source

fn do_clap_compute( &mut self, arg_matches: &ArgMatches<'_>, stdout: &mut dyn Write, ) -> bool

Only compute the model (no output).

Source

fn do_clap_configurations( &mut self, arg_matches: &ArgMatches<'_>, stdout: &mut dyn Write, ) -> bool

Execute the configurations clap subcommand, if requested to.

This computes the model.

Source

fn do_clap_transitions( &mut self, arg_matches: &ArgMatches<'_>, stdout: &mut dyn Write, ) -> bool

Execute the transitions clap subcommand, if requested to.

This computes the model.

Source

fn do_clap_path( &mut self, arg_matches: &ArgMatches<'_>, stdout: &mut dyn Write, ) -> bool

Execute the path clap subcommand, if requested to.

Source

fn do_clap_sequence( &mut self, arg_matches: &ArgMatches<'_>, stdout: &mut dyn Write, ) -> bool

Execute the sequence clap subcommand, if requested to.

Source

fn do_clap_states( &mut self, arg_matches: &ArgMatches<'_>, stdout: &mut dyn Write, ) -> bool

Execute the states clap subcommand, if requested to.

Provided Methods§

Source

fn do_clap(&mut self, arg_matches: &ArgMatches<'_>, stdout: &mut dyn Write)

Execute the chosen clap subcommand.

Return whether a command was executed.

Implementors§

Source§

impl<StateId: IndexLike, MessageId: IndexLike, InvalidId: IndexLike, ConfigurationId: IndexLike, Payload: DataLike, const MAX_AGENTS: usize, const MAX_MESSAGES: usize> ClapModel for Model<StateId, MessageId, InvalidId, ConfigurationId, Payload, MAX_AGENTS, MAX_MESSAGES>