//
//   COMPONENT_NAME: somuc
//
//   ORIGINS: 82, 81, 27
//
//
//   10H9767, 10H9769  (C) COPYRIGHT International Business Machines Corp. 1992,1994
//   All Rights Reserved
//   Licensed Materials - Property of IBM
//   US Government Users Restricted Rights - Use, duplication or
//   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
//
//   Copyright © 1988, 1989 Apple Computer, Inc. All rights reserved.
/*
 * CLASS_NAME: somf_TDeque
 *
 * DESCRIPTION: A TDeque is a TSequence.  It is ordered based on the order
 *              elements are added to, or removed from, the collection.
 *              A TDeque can also be used as a queue, or a stack.
 *
 */
#ifndef TDeq_idl
#define TDeq_idl
#include <tseq.idl>
/* interface somf_MCollectible; */
interface somf_TSequenceIterator;
interface somf_TDequeLinkable;
interface somf_TPrimitiveLinkedList;
interface somf_TDeque : somf_TSequence
{
  somf_TDeque somfTDequeInitF(in somf_MCollectible::somf_MCollectibleCompareFn testfn);
  // Initializes the new deque.
  somf_TDeque somfTDequeInitD(in somf_TDeque s);
  // Initializes the new deque.
  void somfAssign(in somf_TDeque s);
  // Assign the instance of this equal to the instance of source.
  void somfAddAfter(in somf_MCollectible existingobj,
		   in somf_MCollectible tobeadded);
  // Add the obj object into the List after the existing object.
  void somfAddBefore(in somf_MCollectible existingobj,
		    in somf_MCollectible tobeadded);
  // Add the obj object into the List before the existing object.
  void somfAddLast(in somf_MCollectible obj);
  // Add the obj object as the last object in the List.
  void somfAddFirst(in somf_MCollectible obj);
  // Add the obj object as the first object in the List.
  somf_MCollectible somfRemoveLast();
  // Remove the last object in the List.
  somf_MCollectible somfRemoveFirst();
  // Remove the first object in the deque.
  somf_TSequenceIterator somfCreateSequenceIterator();
  // This method returns a new iterator which is suitable for use in iterating
  // over the objects in this collection.
  somf_MCollectible  somfRemoveQ();
  // Remove the object on the deque/queue
  // (This call can be used to simulate a queue)
  void somfInsert(in somf_MCollectible obj);
  // Add the object to the deque/queue
  // (This call can be used to simulate a queue)
  somf_MCollectible somfPop();
  // Remove the object on the top of the deque/stack
  // (This call can be used to simulate a stack)
  void somfPush(in somf_MCollectible obj);
  // Add the object to the top of the deque/stack
  // (This call can be used to simulate a stack)
  somf_TDequeLinkable somfCreateNewLink(in somf_TDequeLinkable p,
				     in somf_TDequeLinkable n,
				     in somf_MCollectible v);
  // Create a new TDeque link, using a TDequeLinkable instance.
#ifdef __SOMIDL__
  implementation {
    releaseorder: somfAddAfter, somfAddBefore, somfAddLast, somfAddFirst,
		  somfRemoveLast, somfRemoveFirst, somfCreateSequenceIterator,
		  somfRemoveQ, somfInsert, somfPop, somfPush, somfCreateNewLink,
		  somfAssign, somfTDequeInitF, somfTDequeInitD;
    majorversion = 2;
    minorversion = 1;
    filestem = tdeq;
    dllname = "somuc.dll";
    passthru C_xh_after =  ""
"#include <mcollect.xh>"
"#include <tseqitr.xh>"
"#include <tdeqlink.xh>"
"";
    passthru C_h_after =  ""
"#include <mcollect.h>"
"#include <tseqitr.h>"
"#include <tdeqlink.h>"
"";
    somf_TPrimitiveLinkedList fImplementation;
    unsigned long fSeed;
    somInit: override;
    somUninit: override;
    somfAdd: override;
    somfRemove: override;
    somfDeleteAll: override;
    somfRemoveAll: override;
    somfCount: override;
    somfAfter: override;
    somfBefore: override;
    somfLast: override;
    somfFirst: override;
    somfMember: override;
    somfCreateIterator: override;
    somfCreateSequenceIterator: nomodify;
    somfCreateNewLink: nomodify;
    somfTDequeInitF: nooverride;
    somfTDequeInitD: nooverride;
  };
#endif /* __SOMIDL__ */
};
#endif  /* TDeq_idl */
