Example #1
0
 public SlotCursorImpl(IChannelProvider provider, SlotCursor cursor, VectorType typeDst)
     : base(provider, cursor)
 {
     Ch.AssertValue(typeDst);
     _getter = RowCursorUtils.GetLabelGetter(cursor);
     _type   = typeDst;
 }
Example #2
0
    void Start()
    {
        instance = this;
        mSprite = this.GetComponent<UISprite>();

        if(uiCamera == null)
        {
            uiCamera = NGUITools.FindCameraForLayer(gameObject.layer);
        }
    }
Example #3
0
        protected override SlotCursor GetSlotCursorCore(int iinfo)
        {
            Host.Assert(0 <= iinfo && iinfo < Infos.Length);
            Host.AssertValue(Infos[iinfo].SlotTypeSrc);
            Host.AssertValue(_exes[iinfo].SlotTypeDst);

            SlotCursor cursor = InputTranspose.GetSlotCursor(Infos[iinfo].Source);

            return(new SlotCursorImpl(Host, cursor, _exes[iinfo].SlotTypeDst));
        }
            private void InitVec <T>(int col)
            {
                var type = Schema.GetColumnType(col);

                Ch.Assert(type.IsVector);
                Ch.Assert(typeof(T) == type.ItemType.RawType);
                var        trans  = _parent.EnsureAndGetTransposer(col);
                SlotCursor cursor = trans.GetSlotCursor(0);
                ValueGetter <VBuffer <T> > getter = cursor.GetGetter <T>();
                int i = _colToActivesIndex[col];

                _getters[i]      = getter;
                _transCursors[i] = cursor;
            }
            private void InitOne <T>(int col)
            {
                var type = Schema.GetColumnType(col);

                Ch.Assert(typeof(T) == type.RawType);
                var        trans  = _parent.EnsureAndGetTransposer(col);
                SlotCursor cursor = trans.GetSlotCursor(0);
                ValueGetter <VBuffer <T> > getter = cursor.GetGetter <T>();
                VBuffer <T>     buff      = default(VBuffer <T>);
                ValueGetter <T> oneGetter =
                    (ref T value) =>
                {
                    getter(ref buff);
                    Ch.Assert(buff.Length == 1);
                    buff.GetItemOrDefault(0, ref value);
                };
                int i = _colToActivesIndex[col];

                _getters[i]      = oneGetter;
                _transCursors[i] = cursor;
            }