Exemple #1
0
        public void HPDF_List_Insert(HPDF_Object target, HPDF_Object item)
        {
            int         targetIdx = HPDF_List_Find(target);
            HPDF_Object lastItem  = Obj[Obj.Count - 1];
            int         i;

            LibLogger.Debug(this.GetType(), " HPDF_List_Insert");

            if (targetIdx < 0)
            {
                Error = new HPDF_Error("HPDF_List_Insert", HPDF_Error.HPDF_ITEM_NOT_FOUND, 0);
            }

            /* move the item of the list to behind one by one. */
            for (i = Obj.Count - 2; i >= targetIdx; i--)
            {
                Obj[i + 1] = Obj[i];
            }

            Obj[targetIdx] = item;

            HPDF_List_Add(lastItem);
        }
Exemple #2
0
 public void HPDF_List_Add(HPDF_Object item)
 {
     Obj.Add(item);
 }