public bool ReadSio(Stream instream) { Sio.SDataBuff d = new Sio.SDataBuff(); if (d.UnSerializ(instream)) { Sio.SListReader l = d.listReader; if (l != null) { Sio.SDataBuff b = new Sio.SDataBuff(); while (l.Next(b)) { Sio.SMapReader mr = b.mapReader; if (mr != null) { NStruct n = new NStruct(); if (n.Unsrial(mr)) { Add(n); } } } return(true); } } return(false); }
public bool Init() { if (partentName != null && partentName.Length != 0) { NStruct p = NStructManager.GetInstance().Find(partentName); if (p != null) { partent = p; } } return(true); }
public bool Add(NStruct ps) { if (cache.ContainsKey(ps.Name)) { cache[ps.Name] = ps; } else { cache.Add(ps.Name, ps); } return(true); }
public void SetPartentName(String name) { partentName = name; if (partent != null && partent.Name.CompareTo(name) == 0) { return; } else { NStruct p = NStructManager.GetInstance().Find(partentName); if (p != null) { partent = p; } } }
public bool ReadBinary(Stream s) { if (s != null) { uint size = Core.Unity.Convert.ReadUint(s); for (uint index = 0; index < size; ++index) { NStruct ps = new NStruct(); if (ps.Unserial(s)) { Add(ps); } } return(true); } return(false); }
public void ChangePartent(NStruct partent) { partentName = partent.Name; this.partent = partent; }
public bool remove(NStruct ps) { return(cache.Remove(ps.Name)); }