예제 #1
0
파일: TypeCodec.cs 프로젝트: anthrax3/Flame
 private bool AssertDecodePointerKind(
     LNode node,
     DecoderState state,
     out PointerKind kind)
 {
     return(state.AssertDecodeEnum(
                node,
                pointerKindDecoding,
                "pointer kind",
                out kind));
 }
예제 #2
0
 private AbcInstance DefineSlotPtrClass(AbcTrait slot, out PointerKind kind)
 {
     if (AbcGenConfig.UseActivationTraits && AbcGenConfig.UseFuncPointers)
     {
         kind = PointerKind.FuncPtr;
         return(_generator.Pointers.FuncPtr.Instance);
     }
     //kind = PointerKind.SlotPtr;
     //return _generator.DefineSlotPtr(slot);
     kind = PointerKind.PropertyPtr;
     return(_generator.Pointers.PropertyPtr(slot.Name));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PointerInputDevice"/> class.
 /// </summary>
 /// <param name="pointerKind">The kind of pointer represented by this input device.</param>
 /// <param name="deviceName">The unique name for this input device.</param>
 public PointerInputDevice(PointerKind pointerKind, string deviceName)
     : base(pointerKind, deviceName)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PointerInputDevice"/> class.
 /// </summary>
 /// <param name="pointerKind">The kind of pointer represented by this input device.</param>
 public PointerInputDevice(PointerKind pointerKind)
     : base(pointerKind)
 {
 }
예제 #5
0
 /// <summary>
 /// Creates a pointer type of a particular kind that has a
 /// type as element.
 /// </summary>
 /// <param name="type">
 /// The type of values referred to by the pointer type.
 /// </param>
 /// <param name="kind">
 /// The kind of the pointer type.
 /// </param>
 /// <returns>A pointer type.</returns>
 public static PointerType MakePointerType(this IType type, PointerKind kind)
 {
     return(PointerType.Create(type, kind));
 }
예제 #6
0
        /// <summary>
        /// Tests if a type is a pointer type of a particular kind.
        /// </summary>
        /// <param name="type">The type to inspect.</param>
        /// <param name="kind">The kind of pointer to test for.</param>
        /// <returns>
        /// <c>true</c> if the type is a pointer type of the specified kind;
        /// otherwise, <c>false</c>.
        /// </returns>
        public static bool IsPointerType(this IType type, PointerKind kind)
        {
            var ptrType = type as PointerType;

            return(ptrType != null && ptrType.Kind == kind);
        }
예제 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PointerInputDevice"/> class.
 /// </summary>
 /// <param name="pointerKind">The kind of pointer represented by this input device.</param>
 /// <param name="deviceName">The unique name for this input device.</param>
 public PointerInputDevice(PointerKind pointerKind, string deviceName)
     : base(deviceName)
 {
     this.pointerKind = pointerKind;
 }
예제 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PointerInputDevice"/> class.
 /// </summary>
 /// <param name="pointerKind">The kind of pointer represented by this input device.</param>
 public PointerInputDevice(PointerKind pointerKind)
     : this(pointerKind, Guid.NewGuid().ToString())
 {
 }
예제 #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PointerInputDevice"/> class.
 /// </summary>
 /// <param name="pointerKind">The kind of pointer represented by this input device.</param>
 /// <param name="isPrimary">A value indicating whether the pointer device is the primary pointer device.</param>
 /// <param name="deviceName">The unique name for this input device.</param>
 public PointerInputDevice(PointerKind pointerKind, bool isPrimary, string deviceName)
     : base(deviceName)
 {
     this.pointerKind = pointerKind;
     this.isPrimary = isPrimary;
 }
예제 #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PointerInputDevice"/> class.
 /// </summary>
 /// <param name="pointerKind">The kind of pointer represented by this input device.</param>
 /// <param name="isPrimary">A value indicating whether the pointer device is the primary pointer device.</param>
 public PointerInputDevice(PointerKind pointerKind, bool isPrimary)
     : this(pointerKind, isPrimary, Guid.NewGuid().ToString())
 {
 }
예제 #11
0
파일: TypeCodec.cs 프로젝트: anthrax3/Flame
 private LNode EncodePointerKind(PointerKind kind, EncoderState state)
 {
     return(state.Factory.Id(pointerKindEncoding[kind]));
 }
예제 #12
0
 /// <summary>
 /// Creates a pointer name from a qualified name and a pointer kind.
 /// </summary>
 /// <param name="elementName">
 /// The name of the element type in this pointer name.
 /// </param>
 /// <param name="kind">
 /// The kind of pointer named by this pointer name.
 /// </param>
 public PointerName(QualifiedName elementName, PointerKind kind)
 {
     this.ElementName = elementName;
     this.Kind        = kind;
 }
예제 #13
0
 public PointerId(PointerKind kind)
 {
     Kind    = kind;
     TouchId = 0;
 }