public override GenericRCOLResource.ChunkEntry Export( IDictionary<ulong, string> nameMap, bool exportAllNames) { System.IO.Stream s = null; TGIBlock tgi = new TGIBlock(0, null, "ITG", ResourceType, 0, 0); JazzRandomNode jrn = new JazzRandomNode(0, null, s); if (this.mSlices.Count > 0) { JazzRandomNode.Outcome outcome; JazzRandomNode.OutcomeList oList = jrn.Outcomes; JazzChunk.ChunkReferenceList dgi; foreach (Slice slice in this.mSlices) { outcome = new JazzRandomNode.Outcome(0, null); outcome.Weight = slice.Weight; dgi = outcome.DecisionGraphIndexes; foreach (DecisionGraphNode dgn in slice.Targets) { dgi.Add(dgn == null ? NullCRef : dgn.ChunkReference); } oList.Add(outcome); } } jrn.Properties = this.mFlags; return new GenericRCOLResource.ChunkEntry(0, null, tgi, jrn); }
public override GenericRCOLResource.ChunkEntry Export( IDictionary <ulong, string> nameMap, bool exportAllNames) { System.IO.Stream s = null; TGIBlock tgi = new TGIBlock(0, null, "ITG", ResourceType, 0, 0); JazzRandomNode jrn = new JazzRandomNode(0, null, s); if (this.mSlices.Count > 0) { JazzRandomNode.Outcome outcome; JazzRandomNode.OutcomeList oList = jrn.Outcomes; JazzChunk.ChunkReferenceList dgi; foreach (Slice slice in this.mSlices) { outcome = new JazzRandomNode.Outcome(0, null); outcome.Weight = slice.Weight; dgi = outcome.DecisionGraphIndexes; foreach (DecisionGraphNode dgn in slice.Targets) { dgi.Add(dgn == null ? NullCRef : dgn.ChunkReference); } oList.Add(outcome); } } jrn.Properties = this.mFlags; return(new GenericRCOLResource.ChunkEntry(0, null, tgi, jrn)); }
public void SetFlags(JazzRandomNode.Flags flags, bool value) { if (value) { this.mFlags |= flags; } else { this.mFlags &= ~flags; } }