home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
tolkit45.zip
/
os2tk45
/
som
/
include
/
tcollect.idl
< prev
next >
Wrap
Text File
|
1999-02-22
|
5KB
|
160 lines
//# @(#) 2.10 src/somuc/tcollect.idl, somuc, som2.1 12/26/95 15:34:03 [7/30/96 14:50:00]
//
// 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_TCollection
*
* DESCRIPTION: This class represents a group of objects. It is implemented
* as an abstract class from which all collection classes inherit
* methods.
*
*/
// This file was generated by the SOM Compiler.
// FileName: TCollect.id2.
// Generated using:
// SOM Precompiler spc: 6.13
// SOM Emitter emitidl.dll: 6.18
#ifndef TCollect_idl
#define TCollect_idl
#include "mcollect.idl"
interface somf_TIterator;
interface somf_TCollection : somf_MCollectible
{
const long kCollectionSizeHint = 8;
//# since TCollection has no code in it's destructor, the
//# following destructor has been commented out.
//#
//# virtual ~TCollection();
somf_MCollectible somfAdd(in somf_MCollectible obj);
// Add obj to this.
//# virtual MCollectible* Add(MCollectible* obj) = 0;
void somfAddAll(in somf_TCollection col);
// Add all of the objects in collection to this. Essentially this is
// equivalent to getting an iterator for the collection passed in and adding
// each element in the collection to this.
//# virtual void AddAll(const TCollection* col);
somf_MCollectible somfRemove(in somf_MCollectible obj);
// Remove obj from this. Return the object which was actually removed
// (which if you are using an IsEqual test function may not be the same as the
// object passed in only "equal")
//# virtual MCollectible* Remove(const MCollectible& obj) = 0;
void somfRemoveAll();
// Remove all of the objects from this.
//# virtual void RemoveAll() = 0;
void somfDeleteAll();
// Remove all of the objects from this and deallocate the storage that these
// objects might have owned (that is, the destructor function is called
// for each object in the collection).
//# virtual void DeleteAll() = 0;
long somfCount();
// Return the number of objects in this.
//# virtual long Count() const = 0;
somf_MCollectible somfMember(in somf_MCollectible obj);
// Each object in this is compared to obj using the function testFn. Return the
// object for which testFn returned TRUE. Return SOMF_NIL if not object was found.
//# virtual MCollectible* Member(const MCollectible& obj) const;
somf_TIterator somfCreateIterator();
// This method returns a new iterator which is suitable for use in iterating
// over the objects in this collection.
//# virtual TIterator* CreateIterator() const = 0;
//# override StreamOut;
//# // Stream stuff
//# // virtual TStream& operator>>=(TStream& towhere) const;
//#
//# override StreamIn;
//# // Stream stuff
//# // virtual TStream& operator<<=(TStream& towhere);
somf_MCollectible::somf_MCollectibleCompareFn somfTestFunction();
// Return the test function. This is usually either IsSame or IsEqual.
//# protected:
//# MCollectibleCompareFn TestFunction() const;
void somfSetTestFunction(in somf_MCollectible::somf_MCollectibleCompareFn testfn);
// Set the test function.
//# protected:
//# void SetTestFunction(MCollectibleCompareFn testfn);
somf_TCollection somfTCollectionInit(in somf_MCollectible::somf_MCollectibleCompareFn testfn);
// Initialize the somf_TCollection test function to testfn.
//# protected:
//# TCollection(MCollectibleCompareFn testfn);
#ifdef __SOMIDL__
implementation {
releaseorder: somfAdd,somfAddAll,somfRemove,somfRemoveAll,somfDeleteAll,
somfCount,somfMember,somfCreateIterator,somfTestFunction,
somfSetTestFunction,somfTCollectionInit;
//# Class Modifiers
majorversion = 2;
minorversion = 1;
filestem = tcollect;
dllname = "somuc.dll";
passthru C_xh_after = ""
"class somf_TCollection;"
"#include <titeratr.xh>";
passthru C_h_after = ""
"#include <titeratr.h>";
//# Internal Instance Variables
somf_MCollectible::somf_MCollectibleCompareFn fTestfn;
//# Method Modifiers
somfCount: nomodify;
somfMember: nomodify;
somfCreateIterator: nomodify;
somfIsEqual: override;
somfTestFunction: nomodify;
somfTCollectionInit: nooverride;
//# Data Modifiers
};
#endif /* __SOMIDL__ */
};
#endif /* TCollect_idl */