예제 #1
0
        public SortedVectorContainerT UnPack()
        {
            var _o = new SortedVectorContainerT();

            this.UnPackTo(_o);
            return(_o);
        }
예제 #2
0
 public void UnPackTo(SortedVectorContainerT _o)
 {
     _o.StringVector = new List <Benchmark.FBBench.Google.SortedVectorStringKeyT>();
     for (var _j = 0; _j < this.StringVectorLength; ++_j)
     {
         _o.StringVector.Add(this.StringVector(_j).HasValue ? this.StringVector(_j).Value.UnPack() : null);
     }
     _o.IntVector = new List <Benchmark.FBBench.Google.SortedVectorIntKeyT>();
     for (var _j = 0; _j < this.IntVectorLength; ++_j)
     {
         _o.IntVector.Add(this.IntVector(_j).HasValue ? this.IntVector(_j).Value.UnPack() : null);
     }
 }
예제 #3
0
        public static Offset <Benchmark.FBBench.Google.SortedVectorContainer> Pack(FlatBufferBuilder builder, SortedVectorContainerT _o)
        {
            if (_o == null)
            {
                return(default(Offset <Benchmark.FBBench.Google.SortedVectorContainer>));
            }
            var _StringVector = default(VectorOffset);

            if (_o.StringVector != null)
            {
                var __StringVector = new Offset <Benchmark.FBBench.Google.SortedVectorStringKey> [_o.StringVector.Count];
                for (var _j = 0; _j < __StringVector.Length; ++_j)
                {
                    __StringVector[_j] = Benchmark.FBBench.Google.SortedVectorStringKey.Pack(builder, _o.StringVector[_j]);
                }
                _StringVector = CreateStringVectorVector(builder, __StringVector);
            }
            var _IntVector = default(VectorOffset);

            if (_o.IntVector != null)
            {
                var __IntVector = new Offset <Benchmark.FBBench.Google.SortedVectorIntKey> [_o.IntVector.Count];
                for (var _j = 0; _j < __IntVector.Length; ++_j)
                {
                    __IntVector[_j] = Benchmark.FBBench.Google.SortedVectorIntKey.Pack(builder, _o.IntVector[_j]);
                }
                _IntVector = CreateIntVectorVector(builder, __IntVector);
            }
            return(CreateSortedVectorContainer(
                       builder,
                       _StringVector,
                       _IntVector));
        }