Exemplo n.º 1
0
 public override ValueGetter <TValue> GetGetter <TValue>(int col)
 {
     Ch.Check(IsColumnActive(col), "col");
     return(Input.GetGetter <TValue>(col));
 }
Exemplo n.º 2
0
 public override bool IsColumnActive(int col)
 {
     Ch.Check(0 <= col && col < _bindings.Infos.Length);
     return(_active == null || _active[col]);
 }
Exemplo n.º 3
0
 public Cursor(IHost host, SequentialDataTransform parent, DataViewRowCursor input)
     : base(host, input)
 {
     Ch.Assert(input.Schema.Count == parent.OutputSchema.Count);
     _parent = parent;
 }
Exemplo n.º 4
0
 public override void FillValues(TRow row)
 {
     Ch.Check(Position >= 0, "Cannot fill values. The cursor is not active.");
     base.FillValues(row);
 }
Exemplo n.º 5
0
        private void txtInput_PreviewKeyDown(object sender, KeyRoutedEventArgs e)
        {
            if (e.Key == VirtualKey.Left)
            {
                if (lblWordOnDeck.Text != "")
                {
                    wordOnDeck.Clear();
                    inputDisplay.Clear();
                    inputConvert.Clear();

                    lblWordOnDeck.Text = "";
                }
                else
                {
                    string ToCut = outputDisplay.ToString();
                    if (ToCut.Length > 0)
                    {
                        outputDisplay.Clear();
                        int i = ToCut.LastIndexOf(" ");
                        outputDisplay.Append(ToCut.Substring(0, i));
                    }


                    //txtOutput.Text = outputDisplay.ToString();
                    txtOutputText.Text = outputDisplay.ToString();
                }

                DahSoundManager.setSource();
                DitSoundManager.setSource();
            }
            else if (e.Key == VirtualKey.Right)
            {
                if (letterOnDeck == "")
                {
                    if (wordOnDeck.ToString() != "")
                    {
                        outputDisplay.Append(" " + wordOnDeck.ToString());

                        //txtOutput.Text = outputDisplay.ToString();
                        txtOutputText.Text = outputDisplay.ToString();

                        lblWordOnDeck.Text = "";

                        wordOnDeck.Clear();
                    }
                }
                else
                {
                    if (letterOnDeck != "#")
                    {
                        wordOnDeck.Append(letterOnDeck);
                    }
                    else
                    {
                        lblWordOnDeck.Text = wordOnDeck.ToString();
                    }
                }


                inputDisplay.Clear();
                inputConvert.Clear();
                letterOnDeck = "";
                DahSoundManager.setSource();
                DitSoundManager.setSource();
            }
            else if (e.Key == VirtualKey.Z && notPressedZ)
            {
                if (inputDisplay.Length < maxLength)
                {
                    inputDisplay.Append(".");
                    inputConvert.Append("z");

                    enumOnDeck   = Converter.morseStringToEnum(inputConvert.ToString());
                    letterOnDeck = Converter.EnumToString(enumOnDeck);

                    lblWordOnDeck.Text = wordOnDeck.ToString() + letterOnDeck;

                    notPressedZ = false;

                    DahSoundManager.stopPlaying();
                    DitSoundManager.play550Hzshort();
                }
            }
            else if (e.Key == VirtualKey.X && notPressedX)
            {
                if (inputDisplay.Length < maxLength)
                {
                    inputDisplay.Append("-");
                    inputConvert.Append("x");

                    enumOnDeck   = Converter.morseStringToEnum(inputConvert.ToString());
                    letterOnDeck = Converter.EnumToString(enumOnDeck);

                    lblWordOnDeck.Text = wordOnDeck.ToString() + letterOnDeck;

                    notPressedX = false;
                    DitSoundManager.stopPlaying();
                    DahSoundManager.play545Hz();
                }
            }
            else
            {
                DitSoundManager.stopPlaying();
                DahSoundManager.stopPlaying();
            }
            txtInput.Text = inputDisplay.ToString();
        }
Exemplo n.º 6
0
 public override bool IsColumnActive(DataViewSchema.Column column)
 {
     Ch.Check(column.Index < Schema.Count);
     return(_active[column.Index]);
 }
Exemplo n.º 7
0
 public override bool IsColumnActive(int col)
 {
     Ch.Check(0 <= col & col < Schema.Count);
     return(_active[col]);
 }
 public override bool IsColumnActive(int col)
 {
     Ch.Check(0 <= col && col < _ungroupBinding.InputColumnCount);
     return(_active[col]);
 }
Exemplo n.º 9
0
 public sealed override bool IsColumnActive(int col)
 {
     Ch.Check(0 <= col && col < Schema.Count);
     return(_active == null || _active[col]);
 }
Exemplo n.º 10
0
 public Cursor(SequentialTransformBase <TInput, TOutput, TState> parent, RowCursor input)
     : base(parent.Host, input)
 {
     Ch.Assert(input.Schema.ColumnCount == parent.OutputSchema.ColumnCount);
     _parent = parent;
 }
Exemplo n.º 11
0
 public sealed override bool IsColumnActive(int col)
 {
     Ch.Check(0 <= col && col < Schema.Count, "Column index is out of range");
     return(Getters[col] != null);
 }
Exemplo n.º 12
0
 public void StopTrigger(int buffnum)
 {
     Ch.StopBuffer(buffnum, Ch.ACSC_ASYNCHRONOUS, ref pWait);
     System.Threading.Thread.Sleep(30);
 }
Exemplo n.º 13
0
 public override bool IsColumnActive(int col)
 {
     Ch.Check(0 <= col && col < _bindings.OutputSchema.Count);
     return(_active == null || _active[col]);
 }
 /// <summary>
 /// Returns whether the given column is active in this row.
 /// </summary>
 public override bool IsColumnActive(DataViewSchema.Column column)
 {
     Ch.CheckParam(column.Index < _colToActivesIndex.Length, nameof(column));
     return(_colToActivesIndex[column.Index] >= 0);
 }
            private Delegate CreateGetterDelegate(int col)
            {
                Ch.CheckParam(IsColumnActive(Schema[col]), nameof(col));

                var parquetType = _loader._columnsLoaded[col].DataType;

                switch (parquetType)
                {
                case DataType.Boolean:
                    return(CreateGetterDelegateCore <bool, bool>(col, _parquetConversions.Conv));

                case DataType.Byte:
                    return(CreateGetterDelegateCore <byte, byte>(col, _parquetConversions.Conv));

                case DataType.SignedByte:
                    return(CreateGetterDelegateCore <sbyte?, sbyte>(col, _parquetConversions.Conv));

                case DataType.UnsignedByte:
                    return(CreateGetterDelegateCore <byte, byte>(col, _parquetConversions.Conv));

                case DataType.Short:
                    return(CreateGetterDelegateCore <short?, short>(col, _parquetConversions.Conv));

                case DataType.UnsignedShort:
                    return(CreateGetterDelegateCore <ushort, ushort>(col, _parquetConversions.Conv));

                case DataType.Int16:
                    return(CreateGetterDelegateCore <short?, short>(col, _parquetConversions.Conv));

                case DataType.UnsignedInt16:
                    return(CreateGetterDelegateCore <ushort, ushort>(col, _parquetConversions.Conv));

                case DataType.Int32:
                    return(CreateGetterDelegateCore <int?, int>(col, _parquetConversions.Conv));

                case DataType.Int64:
                    return(CreateGetterDelegateCore <long?, long>(col, _parquetConversions.Conv));

                case DataType.Int96:
                    return(CreateGetterDelegateCore <BigInteger, DataViewRowId>(col, _parquetConversions.Conv));

                case DataType.ByteArray:
                    return(CreateGetterDelegateCore <byte[], VBuffer <Byte> >(col, _parquetConversions.Conv));

                case DataType.String:
                    return(CreateGetterDelegateCore <string, ReadOnlyMemory <char> >(col, _parquetConversions.Conv));

                case DataType.Float:
                    return(CreateGetterDelegateCore <float?, Single>(col, _parquetConversions.Conv));

                case DataType.Double:
                    return(CreateGetterDelegateCore <double?, Double>(col, _parquetConversions.Conv));

                case DataType.Decimal:
                    return(CreateGetterDelegateCore <decimal?, Double>(col, _parquetConversions.Conv));

                case DataType.DateTimeOffset:
                    return(CreateGetterDelegateCore <DateTimeOffset, DateTimeOffset>(col, _parquetConversions.Conv));

                case DataType.Interval:
                    return(CreateGetterDelegateCore <Interval, TimeSpan>(col, _parquetConversions.Conv));

                default:
                    return(CreateGetterDelegateCore <IList, ReadOnlyMemory <char> >(col, _parquetConversions.Conv));
                }
            }
 private bool IsIndexActive(int iinfo)
 {
     Ch.Assert(0 <= iinfo & iinfo < _bindings.Infos.Length);
     return(_active == null || _active[_bindings.MapIinfoToCol(iinfo)]);
 }
 public override bool IsColumnActive(int col)
 {
     Ch.Check(0 <= col && col < _bindings.ColumnCount);
     return(_active[col]);
 }
 private ValueGetter <T> GetSrcGetter <T>(int iinfo, int isrc)
 {
     Ch.Assert(IsIndexActive(iinfo));
     return(Input.GetGetter <T>(_bindings.Infos[iinfo].SrcIndices[isrc]));
 }
Exemplo n.º 19
0
 public override void FillValues(TRow row)
 {
     Ch.Check(_input.State == CursorState.Good, "Can't fill values: the cursor is not active.");
     base.FillValues(row);
 }
Exemplo n.º 20
0
 public bool IsColumnActive(int col)
 {
     Ch.CheckParam(0 <= col && col < _colToActivesIndex.Length, nameof(col));
     Ch.Assert((_colToActivesIndex[col] >= 0) == _input.IsColumnActive(col));
     return(_input.IsColumnActive(col));
 }
Exemplo n.º 21
0
 protected override bool MoveNextCore()
 {
     Ch.Assert(Position < _view._rowCount);
     return(1 < _view._rowCount - Position);
 }
Exemplo n.º 22
0
 /// <summary>
 /// Returns whether the given column is active in this row.
 /// </summary>
 public override bool IsColumnActive(DataViewSchema.Column column)
 {
     Ch.Check(column.Index < _ungroupBinding.InputColumnCount);
     return(_active[column.Index]);
 }
Exemplo n.º 23
0
 /// <summary>
 /// Returns whether the given column is active in this row.
 /// </summary>
 public override bool IsColumnActive(DataViewSchema.Column column)
 {
     Ch.CheckParam(column.Index < _active.Length, nameof(column));
     _parent._groupBinding.CheckColumnInRange(column.Index);
     return(_active[column.Index]);
 }
Exemplo n.º 24
0
 /// <summary>
 /// Returns whether the given column is active in this row.
 /// </summary>
 public override bool IsColumnActive(DataViewSchema.Column column)
 {
     Ch.Check(column.Index < _bindings.Infos.Length);
     return(_active == null || _active[column.Index]);
 }
Exemplo n.º 25
0
 /// <summary>see <see cref="omg.org.CORBA.IOrbServices.OverrideDefaultCharSets"</summary>
 public void OverrideDefaultCharSets(Ch.Elca.Iiop.Services.CharSet charSet,
                                     Ch.Elca.Iiop.Services.WCharSet wcharSet)
 {
     Ch.Elca.Iiop.Services.CodeSetService.OverrideDefaultCharSets(charSet, wcharSet);
 }
Exemplo n.º 26
0
 public bool IsColumnActive(int col)
 {
     Ch.Check(0 <= col && col < _bindings.ColumnCount);
     return(_active == null || _active[col]);
 }
Exemplo n.º 27
0
            // Note that we don't filter out rows with parsing issues since it's not acceptable to
            // produce a different set of rows when subsetting columns. Any parsing errors need to be
            // translated to NaN, not result in skipping the row. We should produce some diagnostics
            // to alert the user to the issues.
            private Cursor(TextLoader parent, ParseStats stats, bool[] active, LineReader reader, int srcNeeded, int cthd)
                : base(parent._host)
            {
                Ch.Assert(active == null || active.Length == parent._bindings.OutputSchema.Count);
                Ch.AssertValue(reader);
                Ch.AssertValue(stats);
                Ch.Assert(srcNeeded >= 0);
                Ch.Assert(cthd > 0);

                _total     = -1;
                _batch     = -1;
                _bindings  = parent._bindings;
                _parser    = parent._parser;
                _active    = active;
                _reader    = reader;
                _stats     = stats;
                _srcNeeded = srcNeeded;

                ParallelState state = null;

                if (cthd > 1)
                {
                    state = new ParallelState(this, out _rows, cthd);
                }
                else
                {
                    _rows = _parser.CreateRowSet(_stats, 1, _active);
                }

                try
                {
                    _getters = new Delegate[_bindings.Infos.Length];
                    for (int i = 0; i < _getters.Length; i++)
                    {
                        if (_active != null && !_active[i])
                        {
                            continue;
                        }
                        ColumnPipe v = _rows.Pipes[i];
                        Ch.Assert(v != null);
                        _getters[i] = v.GetGetter();
                        Ch.Assert(_getters[i] != null);
                    }

                    if (state != null)
                    {
                        _ator = ParseParallel(state).GetEnumerator();
                        state = null;
                    }
                    else
                    {
                        _ator = ParseSequential().GetEnumerator();
                    }
                }
                finally
                {
                    if (state != null)
                    {
                        state.Dispose();
                    }
                }
            }
Exemplo n.º 28
0
 protected override bool MoveNextCore()
 {
     Ch.Assert(State != CursorState.Done);
     Ch.Assert(Position < _view._rowCount);
     return(1 < _view._rowCount - Position);
 }
Exemplo n.º 29
0
 public override bool IsColumnActive(int col)
 {
     Ch.Check(0 <= col && col < Schema.Count, "col");
     return(Input.IsColumnActive(col));
 }
Exemplo n.º 30
0
 protected override bool MoveManyCore(long count)
 {
     Ch.Assert(State != CursorState.Done);
     Ch.Assert(Position < _view._rowCount);
     return(count < _view._rowCount - Position);
 }
Exemplo n.º 31
0
 /// <summary><see cref="Ch.Elca.Iiop.IServerTransportFactory.GetListenPoints(object)"/></summary>
 public object[] GetListenPoints(Ch.Elca.Iiop.IiopChannelData chanData) {
     ArrayList listenpoints = new ArrayList();
     for (int i = 0; i < chanData.AdditionalTaggedComponents.Length; i++) {
         if (chanData.AdditionalTaggedComponents[i].tag == TAG_SSL_SEC_TRANS.ConstVal) {
             SSLComponentData sslComp =
                 (SSLComponentData)m_codec.decode_value(chanData.AdditionalTaggedComponents[i].component_data,
                                                        SSLComponentData.TypeCode);
             listenpoints.Add(new omg.org.IIOP.ListenPoint(chanData.HostName, sslComp.Port));
         }
     }
     return listenpoints.ToArray();
 }
Exemplo n.º 32
0
 public bool IsColumnActive(int col)
 {
     Ch.Check(0 <= col && col < _parent.GetBindings().ColumnCount);
     return(_active[col]);
 }