use crate::bindings::root::ks::SPageFileStaticEvo;
use crate::wrappers::{ACEvoSessionType, ACEvoStartingGrip};
use super::utils::parse_c_str;
use super::view::View;
pub type StaticView<'a> = View<'a, SPageFileStaticEvo>;
impl<'a> StaticView<'a> {
pub fn sm_version(&self) -> &str {
let version = &self.inner().sm_version;
parse_c_str(version)
}
pub fn ac_evo_version(&self) -> &str {
let version = &self.inner().ac_evo_version;
parse_c_str(version)
}
pub fn session(&self) -> ACEvoSessionType {
ACEvoSessionType::from(self.inner().session)
}
pub fn session_name(&self) -> &str {
let name = &self.inner().session_name;
parse_c_str(name)
}
pub fn starting_grip(&self) -> ACEvoStartingGrip {
ACEvoStartingGrip::from(self.inner().starting_grip)
}
pub fn track(&self) -> &str {
let track = &self.inner().track;
parse_c_str(track)
}
pub fn track_configuration(&self) -> &str {
let config = &self.inner().track_configuration;
parse_c_str(config)
}
pub fn nation(&self) -> &str {
let nation = &self.inner().nation;
parse_c_str(nation)
}
}