示例#1
0
 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);
 }
示例#2
0
        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));
        }
示例#3
0
 public void SetFlags(JazzRandomNode.Flags flags, bool value)
 {
     if (value)
     {
         this.mFlags |= flags;
     }
     else
     {
         this.mFlags &= ~flags;
     }
 }