use crate::{ConstString, EMPTY_STR};
#[derive(Clone, Debug, Default)]
pub struct BehaviorDescription {
name: ConstString,
id: ConstString,
groot2_path: ConstString,
configuration: ConstString,
groot2: bool,
}
impl BehaviorDescription {
#[must_use]
pub fn new(name: &str, id: &str, groot2: bool) -> Self {
Self {
name: name.into(),
id: id.into(),
groot2_path: EMPTY_STR.into(),
configuration: EMPTY_STR.into(),
groot2,
}
}
#[must_use]
pub const fn name(&self) -> &ConstString {
&self.name
}
pub fn set_name(&mut self, name: ConstString) {
self.name = name;
}
#[must_use]
pub const fn id(&self) -> &ConstString {
&self.id
}
#[must_use]
pub const fn groot2(&self) -> bool {
self.groot2
}
#[must_use]
pub const fn configuration(&self) -> &ConstString {
&self.configuration
}
pub fn set_configuration(&mut self, configuration: ConstString) {
self.configuration = configuration.into();
}
#[must_use]
pub const fn groot2_path(&self) -> &ConstString {
&self.groot2_path
}
pub fn set_groot2_path(&mut self, groot2_path: ConstString) {
self.groot2_path = groot2_path.into();
}
}