예제 #1
0
 public bool Enq(RForm objectAdd)           //Enqueue
 {
     if (!IsFull)
     {
         try {
             arrobjects[NewIndex] = objectAdd;
             iCount_PlusFirstIsOneAfterLast++;
             //sLogLine="debug enq iCount_PlusFirstIsOneAfterLast="+iCount_PlusFirstIsOneAfterLast.ToRForm();
             return(true);
         }
         catch (Exception exn) {
             RReporting.ShowExn(exn, "accessing RFormq array", "RFormq Enq(" + RReporting.RFormMessage(objectAdd, false) + ") {enqueue-at:" + NewIndex.ToRForm() + "}");
         }
         return(false);
     }
     else
     {
         RReporting.ShowErr("RFormQ is full, can't enqueue", "RFormQ Enq(" + ((objectAdd == null)?"null RForm":"non-null") + ") {used:" + iCount_PlusFirstIsOneAfterLast.ToRForm() + "}");
         return(false);
     }
 }