Exemple #1
0
 //[MethodImpl(MethodImplOptions.AggressiveInlining)]
 public Boolean Equals(Byte[] src, P_ByteLnk width)
 {
     if (length != width.length)
     {
         return(false);
     }
     return(CompareRaw(src, width.pos));
 }
Exemple #2
0
 //[MethodImpl(MethodImplOptions.AggressiveInlining)]
 public void InsertAfter(JsonNode orig, ref P_ByteLnk key)
 {
     keyIdxes.data = key.data;
     key.length    = -1;
     if (orig == null)
     {
         next = this;
         return;
     }
     next      = orig.next;
     orig.next = this;
 }
Exemple #3
0
        //[MethodImpl(MethodImplOptions.AggressiveInlining)]
        public void ListToValue(JsonTag tag, JsonNode tail)
        {
            Tag = tag;
            JsonNode head = tail;

            if (null != head)
            {
                head           = tail.next;
                tail.next      = null;
                node           = head;
                doubleOrString = head.doubleOrString;
            }
        }
Exemple #4
0
        public void InsertAfter(JsonNode orig, ref P_ByteLnk key)
        { // orig = previous node, 1t, ... / this == last Node
            keyIdxes.data = key.data;
            key.length    = -1;
            if (orig == null)
            {
                next = this;
                return;
            }
            next      = orig.next; // last -> 1st
            orig.next = this;      // 1st -> last
#if DoubleLinked
            this.pred = orig;      // before prev <- last
#endif
        }
Exemple #5
0
        public Boolean KeysEqual(Byte[] src, P_ByteLnk nd)
        {
            if (keyIdxes.length != nd.length)
            {
                return(false);
            }
            int length = keyIdxes.length;

            for (int i = 0; i < length; i++)
            {
                if (src[keyIdxes.pos + i] != src[nd.pos + i])
                {
                    return(false);
                }
            }
            return(true);
        }
Exemple #6
0
 public ByteString(Byte[] storage, P_ByteLnk idxes)
 {
     this.storage = new Byte[idxes.length + 1];
     Array.Copy(storage, idxes.pos, this.storage, 0, idxes.length);
     length = idxes.length;
 }
Exemple #7
0
 public LinkedByteString(P_ByteLnk idxes)
 {
     this.idxes = idxes;
 }
Exemple #8
0
 internal void SetKey(P_ByteLnk keyIdx)
 {
     keyIdxes = keyIdx;
 }