예제 #1
0
        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);
        }
예제 #2
0
파일: Key.cs 프로젝트: branan/PlasmaDotNet
 internal plKey(plCreatableID type, string objName)
 {
     fKeyData = new plUoid(type, objName);
 }
예제 #3
0
파일: Key.cs 프로젝트: branan/PlasmaDotNet
 internal plKey(plUoid uoid)
 {
     fKeyData = uoid;
 }
예제 #4
0
파일: Key.cs 프로젝트: branan/PlasmaDotNet
 /// <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);
 }
예제 #5
0
        internal override plKey ReRegister(plUoid uoid)
        {
            plKey key = fKeyCollector.FindKey(uoid);
            if (key == null) {
                key = new plKey(uoid);
                fKeyCollector.AddKey(key);
            }

            return key;
        }
예제 #6
0
 internal virtual plKey ReRegister(plUoid uoid)
 {
     // Returns an unchecked key.
     return new plKey(uoid);
 }
예제 #7
0
 public void WriteUoid(hsStream s, plKey uoid)
 {
     if (uoid == null) {
         plUoid nil = new plUoid();
         nil.Write(s);
     } else
         uoid.Uoid.Write(s);
 }