
// @(#) 1.2 nt/src/utils/tpllitr.idl, odutils, od96nt, odnt9712d 11/1/96 19:08:11 [ 3/21/97 17:37:36 ]
//
//   Copyright  1988, 1989 Apple Computer, Inc. All rights reserved.

/*
 * DESCRIPTION: An iterator for somf_TPrimitiveLinkedList that will iterate over
 *              all of the objects in a primitive linked list.
 *
 *
 */

#ifndef TPLLItr_idl
#define TPLLItr_idl

#include <somobj.idl>

interface somf_TPrimitiveLinkedList;
interface somf_MLinkable;

interface somf_TPrimitiveLinkedListIterator : SOMObject
{
  somf_TPrimitiveLinkedListIterator somfTPrimitiveLinkedListIteratorInit(in somf_TPrimitiveLinkedList list);

  // Initialize somf_TPrimitiveLinkedListIterator using somf_TPrimitiveLinkedList list.

  somf_MLinkable somfFirst();

  // Reset the iterator and return the first element of the list.

  somf_MLinkable somfNext();

  // Retrieve the next object in the list and return it.

  somf_MLinkable somfLast();

  // Retrieve the last object in the list and return it.

  somf_MLinkable somfPrevious();

  // Retrieve the previous object in the list and return it.

#ifdef __SOMIDL__
  implementation {

    releaseorder: somfFirst,somfNext,somfLast,somfPrevious,
		  somfTPrimitiveLinkedListIteratorInit;

    majorversion = 2;
    minorversion = 1;
    filestem = tpllitr;
    dllname = "somuc.dll";

    passthru C_xh_after =  ""
"#include <mlink.xh>"
"#include <tpll.xh>";

    passthru C_h_after =  ""
"#include <mlink.h>"
"#include <tpll.h>";

    somf_TPrimitiveLinkedList fList;
    somf_MLinkable fCurrent;
    somf_MLinkable fSentinel;

    somUninit: override;
    somfTPrimitiveLinkedListIteratorInit: nooverride;

  };
#endif /* __SOMIDL__ */
};

#endif  /* TPLLItr_idl */
