use super::Attribute;
use enumset::EnumSet;
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct ClassDefinition {
pub name: String,
pub attributes: EnumSet<Attribute>,
pub static_properties: Vec<String>,
}
impl Default for ClassDefinition {
fn default() -> Self {
Self {
name: "Object".to_string(),
attributes: EnumSet::empty(),
static_properties: Vec::new(),
}
}
}
impl ClassDefinition {
pub fn default_with_name(name: String) -> Self {
Self {
name,
attributes: EnumSet::empty(),
static_properties: Vec::new(),
}
}
}