Exemple #1
0
        // map.c (121, 1)
        // l_amapFind(m, key) as Rb_Type
        // l_amapFind(L_AMAP *, RB_TYPE) as RB_TYPE *
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_amapFind/*"/>
        ///   <returns></returns>
        public static Rb_Type l_amapFind(
            L_Rbtree m,
            Rb_Type key)
        {
            if (m == null)
            {
                throw new ArgumentNullException("m cannot be Nothing");
            }

            if (key == null)
            {
                throw new ArgumentNullException("key cannot be Nothing");
            }

            IntPtr mPtr = IntPtr.Zero; if (m != null)
            {
                mPtr = m.Pointer;
            }
            IntPtr keyPtr = IntPtr.Zero; if (key != null)
            {
                keyPtr = key.Pointer;
            }
            IntPtr _Result = Natives.l_amapFind(m.Pointer, key.Pointer);

            if (_Result == IntPtr.Zero)
            {
                return(null);
            }

            return(new Rb_Type(_Result));
        }
Exemple #2
0
        // map.c (220, 1)
        // l_asetDelete(s, key) as Object
        // l_asetDelete(L_ASET *, RB_TYPE) as void
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_asetDelete/*"/>
        public static void l_asetDelete(
            L_Rbtree s,
            Rb_Type key)
        {
            if (s == null)
            {
                throw new ArgumentNullException("s cannot be Nothing");
            }

            if (key == null)
            {
                throw new ArgumentNullException("key cannot be Nothing");
            }

            IntPtr sPtr = IntPtr.Zero; if (s != null)
            {
                sPtr = s.Pointer;
            }
            IntPtr keyPtr = IntPtr.Zero; if (key != null)

            {
                keyPtr = key.Pointer;
            }

            Natives.l_asetDelete(s.Pointer, key.Pointer);
        }
Exemple #3
0
        // map.c (203, 1)
        // l_asetFind(s, key) as Rb_Type
        // l_asetFind(L_ASET *, RB_TYPE) as RB_TYPE *
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_asetFind/*"/>
        ///   <returns></returns>
        public static Rb_Type l_asetFind(
            L_Rbtree s,
            Rb_Type key)
        {
            if (s == null)
            {
                throw new ArgumentNullException("s cannot be Nothing");
            }

            if (key == null)
            {
                throw new ArgumentNullException("key cannot be Nothing");
            }

            IntPtr sPtr = IntPtr.Zero; if (s != null)
            {
                sPtr = s.Pointer;
            }
            IntPtr keyPtr = IntPtr.Zero; if (key != null)
            {
                keyPtr = key.Pointer;
            }
            IntPtr _Result = Natives.l_asetFind(s.Pointer, key.Pointer);

            if (_Result == IntPtr.Zero)
            {
                return(null);
            }

            return(new Rb_Type(_Result));
        }
Exemple #4
0
        // map.c (136, 1)
        // l_amapDelete(m, key) as Object
        // l_amapDelete(L_AMAP *, RB_TYPE) as void
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_amapDelete/*"/>
        public static void l_amapDelete(
            L_Rbtree m,
            Rb_Type key)
        {
            if (m == null)
            {
                throw new ArgumentNullException("m cannot be Nothing");
            }

            if (key == null)
            {
                throw new ArgumentNullException("key cannot be Nothing");
            }

            IntPtr mPtr = IntPtr.Zero; if (m != null)
            {
                mPtr = m.Pointer;
            }
            IntPtr keyPtr = IntPtr.Zero; if (key != null)

            {
                keyPtr = key.Pointer;
            }

            Natives.l_amapDelete(m.Pointer, key.Pointer);
        }
Exemple #5
0
        // rbtree.c (453, 1)
        // l_rbtreeGetCount(t) as int
        // l_rbtreeGetCount(L_RBTREE *) as l_int32
        ///  <summary>
        /// l_rbtreeGetCount()
        ///  </summary>
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_rbtreeGetCount/*"/>
        ///  <param name="t">[in] - rbtree</param>
        ///   <returns>count  the number of nodes in the tree, or 0 on error</returns>
        public static int l_rbtreeGetCount(
            L_Rbtree t)
        {
            if (t == null)
            {
                throw new ArgumentNullException("t cannot be Nothing");
            }

            int _Result = Natives.l_rbtreeGetCount(t.Pointer);

            return(_Result);
        }
Exemple #6
0
        // map.c (173, 1)
        // l_amapSize(m) as int
        // l_amapSize(L_AMAP *) as l_int32
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_amapSize/*"/>
        ///   <returns></returns>
        public static int l_amapSize(
            L_Rbtree m)
        {
            if (m == null)
            {
                throw new ArgumentNullException("m cannot be Nothing");
            }

            IntPtr mPtr = IntPtr.Zero; if (m != null)
            {
                mPtr = m.Pointer;
            }
            int _Result = Natives.l_amapSize(m.Pointer);

            return(_Result);
        }
Exemple #7
0
        // map.c (143, 1)
        // l_amapDestroy(pm) as Object
        // l_amapDestroy(L_AMAP **) as void
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_amapDestroy/*"/>
        public static void l_amapDestroy(
            L_Rbtree pm)
        {
            if (pm == null)
            {
                throw new ArgumentNullException("pm cannot be Nothing");
            }

            IntPtr pmPtr = IntPtr.Zero;     if (pm != null)

            {
                pmPtr = pm.Pointer;
            }

            Natives.l_amapDestroy(pmPtr);
        }
Exemple #8
0
        // map.c (227, 1)
        // l_asetDestroy(ps) as Object
        // l_asetDestroy(L_ASET **) as void
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_asetDestroy/*"/>
        public static void l_asetDestroy(
            L_Rbtree ps)
        {
            if (ps == null)
            {
                throw new ArgumentNullException("ps cannot be Nothing");
            }

            IntPtr psPtr = IntPtr.Zero;     if (ps != null)

            {
                psPtr = ps.Pointer;
            }

            Natives.l_asetDestroy(psPtr);
        }
Exemple #9
0
        // map.c (257, 1)
        // l_asetSize(s) as int
        // l_asetSize(L_ASET *) as l_int32
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_asetSize/*"/>
        ///   <returns></returns>
        public static int l_asetSize(
            L_Rbtree s)
        {
            if (s == null)
            {
                throw new ArgumentNullException("s cannot be Nothing");
            }

            IntPtr sPtr = IntPtr.Zero; if (s != null)
            {
                sPtr = s.Pointer;
            }
            int _Result = Natives.l_asetSize(s.Pointer);

            return(_Result);
        }
Exemple #10
0
        // rbtree.c (486, 1)
        // l_rbtreePrint(fp, t) as Object
        // l_rbtreePrint(FILE *, L_RBTREE *) as void
        ///  <summary>
        /// l_rbtreePrint()
        ///  </summary>
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_rbtreePrint/*"/>
        ///  <param name="fp">[in] - file stream</param>
        ///  <param name="t">[in] - rbtree</param>
        public static void l_rbtreePrint(
            FILE fp,
            L_Rbtree t)
        {
            if (fp == null)
            {
                throw new ArgumentNullException("fp cannot be Nothing");
            }

            if (t == null)
            {
                throw new ArgumentNullException("t cannot be Nothing");
            }

            Natives.l_rbtreePrint(fp.Pointer, t.Pointer);
        }
Exemple #11
0
        // rbtree.c (235, 1)
        // l_rbtreeDelete(t, key) as Object
        // l_rbtreeDelete(L_RBTREE *, RB_TYPE) as void
        ///  <summary>
        /// l_rbtreeDelete()
        ///  </summary>
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_rbtreeDelete/*"/>
        ///  <param name="t">[in] - rbtree, including root node</param>
        ///  <param name="key">[in] - (delete the node with this key</param>
        public static void l_rbtreeDelete(
            L_Rbtree t,
            Rb_Type key)
        {
            if (t == null)
            {
                throw new ArgumentNullException("t cannot be Nothing");
            }

            if (key == null)
            {
                throw new ArgumentNullException("key cannot be Nothing");
            }

            Natives.l_rbtreeDelete(t.Pointer, key.Pointer);
        }
Exemple #12
0
        // rbtree.c (388, 1)
        // l_rbtreeGetLast(t) as L_Rbtree_Node
        // l_rbtreeGetLast(L_RBTREE *) as L_RBTREE_NODE *
        ///  <summary>
        /// (1) This is the last node in an in-order traversal.
        ///  </summary>
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_rbtreeGetLast/*"/>
        ///  <param name="t">[in] - rbtree, including root node</param>
        ///   <returns>void</returns>
        public static L_Rbtree_Node l_rbtreeGetLast(
            L_Rbtree t)
        {
            if (t == null)
            {
                throw new ArgumentNullException("t cannot be Nothing");
            }

            IntPtr _Result = Natives.l_rbtreeGetLast(t.Pointer);

            if (_Result == IntPtr.Zero)
            {
                return(null);
            }

            return(new L_Rbtree_Node(_Result));
        }
Exemple #13
0
        // map.c (161, 1)
        // l_amapGetLast(m) as L_Rbtree_Node
        // l_amapGetLast(L_AMAP *) as L_AMAP_NODE *
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_amapGetLast/*"/>
        ///   <returns></returns>
        public static L_Rbtree_Node l_amapGetLast(
            L_Rbtree m)
        {
            if (m == null)
            {
                throw new ArgumentNullException("m cannot be Nothing");
            }

            IntPtr mPtr = IntPtr.Zero; if (m != null)
            {
                mPtr = m.Pointer;
            }
            IntPtr _Result = Natives.l_amapGetLast(m.Pointer);

            if (_Result == IntPtr.Zero)
            {
                return(null);
            }

            return(new L_Rbtree_Node(_Result));
        }
Exemple #14
0
        // map.c (245, 1)
        // l_asetGetLast(s) as L_Rbtree_Node
        // l_asetGetLast(L_ASET *) as L_ASET_NODE *
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_asetGetLast/*"/>
        ///   <returns></returns>
        public static L_Rbtree_Node l_asetGetLast(
            L_Rbtree s)
        {
            if (s == null)
            {
                throw new ArgumentNullException("s cannot be Nothing");
            }

            IntPtr sPtr = IntPtr.Zero; if (s != null)
            {
                sPtr = s.Pointer;
            }
            IntPtr _Result = Natives.l_asetGetLast(s.Pointer);

            if (_Result == IntPtr.Zero)
            {
                return(null);
            }

            return(new L_Rbtree_Node(_Result));
        }
Exemple #15
0
        // rbtree.c (181, 1)
        // l_rbtreeInsert(t, key, value) as Object
        // l_rbtreeInsert(L_RBTREE *, RB_TYPE, RB_TYPE) as void
        ///  <summary>
        /// (1) If a node with the key already exists, this just updates the value.
        ///  </summary>
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_rbtreeInsert/*"/>
        ///  <param name="t">[in] - rbtree, including root node</param>
        ///  <param name="key">[in] - insert a node with this key, if the key does not already exist in the tree</param>
        ///  <param name="value">[in] - typically an int, used for an index</param>
        public static void l_rbtreeInsert(
            L_Rbtree t,
            Rb_Type key,
            Rb_Type value)
        {
            if (t == null)
            {
                throw new ArgumentNullException("t cannot be Nothing");
            }

            if (key == null)
            {
                throw new ArgumentNullException("key cannot be Nothing");
            }

            if (value == null)
            {
                throw new ArgumentNullException("value cannot be Nothing");
            }

            Natives.l_rbtreeInsert(t.Pointer, key.Pointer, value.Pointer);
        }
Exemple #16
0
        // rbtree.c (154, 1)
        // l_rbtreeLookup(t, key) as Rb_Type
        // l_rbtreeLookup(L_RBTREE *, RB_TYPE) as RB_TYPE *
        ///  <summary>
        /// l_rbtreeLookup()
        ///  </summary>
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_rbtreeLookup/*"/>
        ///  <param name="t">[in] - rbtree, including root node</param>
        ///  <param name="key">[in] - find a node with this key</param>
        ///   <returns>[and]value     a pointer to a union, if the node exists else NULL</returns>
        public static Rb_Type l_rbtreeLookup(
            L_Rbtree t,
            Rb_Type key)
        {
            if (t == null)
            {
                throw new ArgumentNullException("t cannot be Nothing");
            }

            if (key == null)
            {
                throw new ArgumentNullException("key cannot be Nothing");
            }

            IntPtr _Result = Natives.l_rbtreeLookup(t.Pointer, key.Pointer);

            if (_Result == IntPtr.Zero)
            {
                return(null);
            }

            return(new Rb_Type(_Result));
        }
Exemple #17
0
        // map.c (128, 1)
        // l_amapInsert(m, key, value) as Object
        // l_amapInsert(L_AMAP *, RB_TYPE, RB_TYPE) as void
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_amapInsert/*"/>
        public static void l_amapInsert(
            L_Rbtree m,
            Rb_Type key,
            Rb_Type value)
        {
            if (m == null)
            {
                throw new ArgumentNullException("m cannot be Nothing");
            }

            if (key == null)
            {
                throw new ArgumentNullException("key cannot be Nothing");
            }

            if (value == null)
            {
                throw new ArgumentNullException("value cannot be Nothing");
            }

            IntPtr mPtr = IntPtr.Zero; if (m != null)
            {
                mPtr = m.Pointer;
            }
            IntPtr keyPtr = IntPtr.Zero; if (key != null)
            {
                keyPtr = key.Pointer;
            }
            IntPtr valuePtr = IntPtr.Zero; if (value != null)

            {
                valuePtr = value.Pointer;
            }

            Natives.l_amapInsert(m.Pointer, key.Pointer, value.Pointer);
        }