home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
tolkit45.zip
/
os2tk45
/
som
/
include
/
tdeq.idl
< prev
next >
Wrap
Text File
|
1999-02-22
|
7KB
|
227 lines
//# @(#) 2.12 src/somuc/tdeq.idl, somuc, som2.1 12/26/95 15:35:48 [7/30/96 14:50:03]
//
// COMPONENT_NAME: somuc
//
// ORIGINS: 82, 81, 27
//
//
// 25H7912 (C) COPYRIGHT International Business Machines Corp. 1992,1996,1996
// 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
{
//# friend class TDequeIterator;
//# friend class TDequeCursor;
somf_TDeque somfTDequeInitF(in somf_MCollectible::somf_MCollectibleCompareFn testfn);
// Initializes the new deque.
//# TDeque(MCollectibleCompareFn testfn);
somf_TDeque somfTDequeInitD(in somf_TDeque s);
// Initializes the new deque.
//# TDeque(const TDeque&);
//# The following method is overridden below:
//# virtual ~TDeque();
void somfAssign(in somf_TDeque s);
// Assign the instance of this equal to the instance of source.
//# const TDeque& operator=(const TDeque&);
//# The following methods are overridden below:
//# virtual MCollectible* Add(MCollectible* obj);
//# virtual MCollectible* Remove(const MCollectible& obj);
//# virtual void DeleteAll();
//# virtual void RemoveAll();
//# virtual long Count() const;
//# virtual MCollectible* After(const MCollectible& obj) const;
//# virtual MCollectible* Before(const MCollectible& obj) const;
void somfAddAfter(in somf_MCollectible existingobj,
in somf_MCollectible tobeadded);
// Add the obj object into the List after the existing object.
//# virtual void AddAfter(const MCollectible& existingobj,
//# MCollectible* tobeadded);
void somfAddBefore(in somf_MCollectible existingobj,
in somf_MCollectible tobeadded);
// Add the obj object into the List before the existing object.
//# virtual void AddBefore(const MCollectible& existingobj,
//# MCollectible* tobeadded);
void somfAddLast(in somf_MCollectible obj);
// Add the obj object as the last object in the List.
//# virtual void AddLast(MCollectible* obj);
void somfAddFirst(in somf_MCollectible obj);
// Add the obj object as the first object in the List.
//# virtual void AddFirst(MCollectible* obj);
//# The following methods are overridden below:
//# virtual MCollectible* Last() const;
//# virtual MCollectible* First() const;
somf_MCollectible somfRemoveLast();
// Remove the last object in the List.
//# virtual MCollectible* RemoveLast();
somf_MCollectible somfRemoveFirst();
// Remove the first object in the deque.
//# virtual MCollectible* RemoveFirst();
//# The following methods are overridden below:
//# virtual MCollectible* Member(const MCollectible& obj) const;
//# virtual TIterator* CreateIterator() const;
somf_TSequenceIterator somfCreateSequenceIterator();
// This method returns a new iterator which is suitable for use in iterating
// over the objects in this collection.
//# virtual TSequenceIterator* CreateSequenceIterator() const;
//# The following operators are not ported until Streaming is ported.
//# virtual TStream& operator>>=(TStream& towhere) const;
//# virtual TStream& operator<<=(TStream& towhere);
//#override somfClone;
//# There is no point in overriding somfClone, the code was fixed so it works
//# correctly.
//# MCollectibleDeclarationsMacro(TDeque);
somf_MCollectible somfRemoveQ();
// Remove the object on the deque/queue
// (This call can be used to simulate a queue)
//# MCollectible* Remove();
void somfInsert(in somf_MCollectible obj);
// Add the object to the deque/queue
// (This call can be used to simulate a queue)
//# void Insert(MCollectible* obj);
somf_MCollectible somfPop();
// Remove the object on the top of the deque/stack
// (This call can be used to simulate a stack)
//# MCollectible* Pop();
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)
//# void Push(MCollectible* obj);
//# The following methods are not ported since I didn't think they
//# were for public consumption.
//# TPrimitiveLinkedList& AccessImplementation();
//# void Sync();
somf_TDequeLinkable somfCreateNewLink(in somf_TDequeLinkable p,
in somf_TDequeLinkable n,
in somf_MCollectible v);
// Create a new TDeque link, using a TDequeLinkable instance.
//# protected:
//# virtual TDequeLinkable* CreateNewLink(TDequeLinkable*,
//# TDequeLinkable*,
//# MCollectible*) const;
#ifdef __SOMIDL__
implementation {
releaseorder: somfAddAfter, somfAddBefore, somfAddLast, somfAddFirst,
somfRemoveLast, somfRemoveFirst, somfCreateSequenceIterator,
somfRemoveQ, somfInsert, somfPop, somfPush, somfCreateNewLink,
somfAssign, somfTDequeInitF, somfTDequeInitD;
//# Class Modifiers
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>"
"";
//# Internal Instance Variables
somf_TPrimitiveLinkedList fImplementation;
unsigned long fSeed;
//# Method Modifiers
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;
//# Data Modifiers
};
#endif /* __SOMIDL__ */
};
#endif /* TDeq_idl */