#[derive(Default, Debug, derive_new::new, derive_deref_rs::Deref)]
pub struct PBXObjectCollection(pub(crate) HashMap<String, PBXObject>);
/// TODO: make collections a HashSet of PBXObject with identifier included?
impl PBXObjectCollection {
pub(crate) fn set_inner(&mut self, map: HashMap<String, PBXObject>) {
self.0 = map;
}
/// Add new object. same as insert but it auto create id and returns it
pub fn push<O: Into<PBXObject>>(&mut self, object: O) -> String {
let id = uuid::Uuid::new_v4().to_string();
https://github.com/tami5/xcodeproj/blob/304cada7cc54fd2e930e3fb447ca0f7841c10610/src/pbxproj/object/collection.rs#L15