use std::sync::Mutex;
use serde::{Deserialize, Serialize};
use crate::rubase::BaseEntity;
use crate::rucmd::ruframe;
use crate::rucmd::ruframe::command_line::CommandLine;
#[derive(Debug, Default,Serialize,Deserialize)]
pub struct CommandLines {
cmdLines: Mutex<Vec<CommandLine>>,
}
impl BaseEntity for CommandLines {}
impl CommandLines {
pub fn new(cmd: String ) -> CommandLines {
CommandLines {
cmdLines: Mutex::new(Vec::new()),
}
}
pub fn reg(&mut self, cmd: &str ) {
println!("reg: {}", cmd);
self.cmdLines.lock().unwrap().push(ruframe::command_line::CommandLine::default());
}
}