public plKey ReadUoid(hsStream s) { plUoid uoid = new plUoid(); uoid.Read(s); // Plasma21+ uses an Invalid plLocation to indicate NULL keys if (s.Version.IsPlasma21 && uoid.fLocation.Invalid) return null; else return ReRegister(uoid); }
internal plKey(plCreatableID type, string objName) { fKeyData = new plUoid(type, objName); }
internal plKey(plUoid uoid) { fKeyData = uoid; }
/// <summary> /// Creates a FAKE plKey based on the information given. /// </summary> /// <remarks> /// This key will NOT be added to (or checked by) the internal KeyCollector; therefore, you should /// ONLY use this method if you know what you're doing! Othwerise, you will create duplicate keys /// and completely screw the garbage collection. /// </remarks> /// <param name="loc">Key's Location</param> /// <param name="type">Managed Type ID</param> /// <param name="name">Object Name</param> /// <param name="id">Object ID</param> /// <returns>Fabricated key</returns> public static plKey Fabricate(plLocation loc, plCreatableID type, string name, uint id) { plUoid uoid = new plUoid(type, name); uoid.fLocation = loc; uoid.fObjectID = id; return new plKey(uoid); }
internal override plKey ReRegister(plUoid uoid) { plKey key = fKeyCollector.FindKey(uoid); if (key == null) { key = new plKey(uoid); fKeyCollector.AddKey(key); } return key; }
internal virtual plKey ReRegister(plUoid uoid) { // Returns an unchecked key. return new plKey(uoid); }
public void WriteUoid(hsStream s, plKey uoid) { if (uoid == null) { plUoid nil = new plUoid(); nil.Write(s); } else uoid.Uoid.Write(s); }