use lief_ffi as ffi;
use crate::common::FromFFI;
use std::marker::PhantomData;
pub struct Property<'a> {
ptr: cxx::UniquePtr<ffi::ObjC_Property>,
_owner: PhantomData<&'a ()>,
}
impl FromFFI<ffi::ObjC_Property> for Property<'_> {
fn from_ffi(info: cxx::UniquePtr<ffi::ObjC_Property>) -> Self {
Self {
ptr: info,
_owner: PhantomData,
}
}
}
impl Property<'_> {
pub fn name(&self) -> String {
self.ptr.name().to_string()
}
pub fn attribute(&self) -> String {
self.ptr.attribute().to_string()
}
}