Lines Matching refs:item

532 	FindRightMost() must be invoked. They set the iterator to an item
562 ItemIterator::GetCurrent(Item *item)
565 status_t error = (item ? _GetLeafNode(&node) : B_BAD_VALUE);
568 error = item->SetTo(node, fIndex);
577 ItemIterator::GoToPrevious(Item *item)
582 // get the leaf node on which the next item resides
590 // got the node, get the item
593 if (item)
594 error = item->SetTo(node, fIndex);
602 ItemIterator::GoToNext(Item *item)
609 // get the leaf node on which the next item resides
615 // got the node, get the item
620 if (item)
621 error = item->SetTo(node, fIndex);
629 /*! \brief Finds the rightmost item that may contain the supplied key.
631 The method finds the rightmost item whose left delimiting key is not
635 \param item Pointer to a pre-allocated Item that shall be set
636 to the found item.
640 ItemIterator::FindRightMostClose(const VKey *k, Item *item)
651 if (error == B_OK && item)
653 error = item->SetTo(node, fIndex);
655 //printf(" found item: ");
656 //item->GetKey(&itemKey)->Dump();
664 /*! \brief Finds the rightmost item that starts with the supplied key.
666 The method finds the rightmost item whose left delimiting key is equal
670 \param item Pointer to a pre-allocated Item that shall be set
671 to the found item.
675 ItemIterator::FindRightMost(const VKey *k, Item *item)
678 // find the first item with a greater or equal key, and check whether the
687 if (item)
688 *item = closeItem;
746 // find the first item with a less or equal key
762 // check whether all item keys are greater
819 beginning. The GetNext() does always find the item on the rightmost
873 /*! \brief Returns the next item belonging to the object.
879 beginning. The GetNext() does always find the item on the rightmost
884 to the found item.
896 // get the next item
897 Item item;
899 // first invocation: find the item with the given IDs and offset
901 error = fItemIterator.FindRightMostClose(&k, &item);
904 // item iterator positioned, get the next item
905 error = fItemIterator.GoToNext(&item);
908 // check whether the item belongs to our object
911 if (item.GetDirID() == fDirID && item.GetObjectID() == fObjectID)
912 *foundItem = item;
915 //PRINT((" found item for another object: (%lu, %lu)\n", item.GetDirID(), item.GetObjectID()));
927 /*! \brief Returns the next item belonging to the object.
932 to the found item.
933 \param type The type the found item must have.
948 /*! \brief Returns the previous item belonging to the object.
950 to the found item.
962 // get the next item
963 Item item;
965 // first invocation: find the rightmost item of the object
967 error = fItemIterator.FindRightMostClose(&k, &item);
970 // item iterator positioned, get the previous item
971 error = fItemIterator.GoToPrevious(&item);
973 // check whether the item belongs to our object
976 if (item.GetDirID() == fDirID && item.GetObjectID() == fObjectID) {
977 //PRINT((" found item: %lu, %lu, %Lu\n", fDirID, fObjectID, item.GetOffset()));
978 *foundItem = item;
981 //PRINT((" item belongs to different object: (%lu, %lu)\n", item.GetDirID(), item.GetObjectID()));
993 /*! \brief Returns the previous item belonging to the object.
998 to the found item.
999 \param type The type the found item must have.
1120 to the found item.
1141 else // bad data: skip the item
1165 to the found item.
1189 else // bad data: skip the item
1193 //printf(" found dir item: %s\n", strerror(error));
1352 FATAL(("Neither direct nor indirect item! type: %u\n",
1401 // get the stat item
1424 // to the current position, we simply reinit the item iterator
1445 // next item implies, that all blocks are fully used.
1447 // come to the next item.