home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
tolkit45.zip
/
os2tk45
/
som
/
include
/
tset.idl
< prev
next >
Wrap
Text File
|
1999-02-22
|
7KB
|
223 lines
//# @(#) 2.12 src/somuc/tset.idl, somuc, som2.1 12/26/95 15:41:09 [7/30/96 14:50:10]
//
// 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_TSet
*
* DESCRIPTION: The somf_TSet class is a subclass of somf_TCollection. It
* represents an unordered collection of objects in which objects
* can appear only once. Objects which are inserted into the
* somf_TSet should override the Hash() method and the IsSame() or
* IsEqual() method.
*
*/
// This file was generated by the SOM Compiler.
// FileName: TSet.id2.
// Generated using:
// SOM Precompiler spc: 6.13
// SOM Emitter emitidl.dll: 6.18
#ifndef TSet_idl
#define TSet_idl
#include "tcollect.idl"
interface TSAssoc;
interface somf_TSet : somf_TCollection
{
enum ESetClassification { kUnchecked, kNormal, kFast };
//# friend class TSetIterator;
somf_TSet somfTSetInitFL(in somf_MCollectible::somf_MCollectibleCompareFn testfn,
in long setSizeHint);
// Initializes the new set.
//# TSet(MCollectibleCompareFn testfn, long setSizeHint=kCollectionSizeHint);
somf_TSet somfTSetInitF(in somf_MCollectible::somf_MCollectibleCompareFn testfn);
// Initializes the new set.
//# TSet(MCollectibleCompareFn testfn, long setSizeHint=kCollectionSizeHint);
somf_TSet somfTSetInitLF(in long setSizeHint,
in somf_MCollectible::somf_MCollectibleCompareFn testfn);
// Initializes the new set.
//# TSet(MCollectibleCompareFn testfn, long setSizeHint=kCollectionSizeHint);
somf_TSet somfTSetInitL(in long setSizeHint);
// Initializes the new set.
//# TSet(MCollectibleCompareFn testfn, long setSizeHint=kCollectionSizeHint);
somf_TSet somfTSetInitS(in somf_TSet s);
// Initializes the new set.
//# TSet(const TSet& s);
void somfAssign(in somf_TSet source);
// Assign the instance of this equal to the instance of source.
//# const TSet& operator=(const TSet&);
void somfDifferenceS(in somf_TSet set1);
// Destructively modify this to contain a set of elements of this that do not
// appear in set1
//# virtual void Difference(const TSet& set1);
void somfDifferenceSS(in somf_TSet set1,
in somf_TSet resultSet);
// After this function is called, resultSet will contain a set of elements of
// this that do not appear in set1
//# virtual void Difference(const TSet& set1, TSet& resultSet) const;
void somfIntersectionS(in somf_TSet set1);
// Destructively modify this to contain everything that is an element of set1
// and this.
//# virtual void Intersection(const TSet& set1);
void somfIntersectionSS(in somf_TSet set1,
in somf_TSet resultSet);
// After this function is called, resultSet will contain everything that is an
// element of set1 and this.
//# virtual void Intersection(const TSet& set1, TSet& resultSet) const;
void somfUnionS(in somf_TSet set1);
// Destructively modify this to contain everything that is an element of either
// set1 or this.
//# virtual void Union(const TSet& set1);
void somfUnionSS(in somf_TSet set1,
in somf_TSet resultSet);
// After this function is called, resultSet will contain everything that is an
// element of either set1 or this.
//# virtual void Union(const TSet& set1, TSet& resultSet) const;
void somfXorS(in somf_TSet set1);
// Destructively modify this to contain everything that is an element of either
// set1 or this, but not both.
//# virtual void Xor(const TSet& set1);
void somfXorSS(in somf_TSet set1,
in somf_TSet resultSet);
// After this function is called, resultSet will contain everything that is an
// element of either set1 or this, but not both.
//# virtual void Xor(const TSet& set1, TSet& resultSet) const;
void somfSetHashFunction(in somf_MCollectible::somf_MCollectibleHashFn fn);
// Set the hash function to fn.
//# virtual void SetHashFunction(MCollectibleHashFn);
somf_MCollectible::somf_MCollectibleHashFn somfGetHashFunction();
// Return the hash function.
//# virtual MCollectibleHashFn GetHashFunction() const;
void somfRehash();
// Rehash the set, cleaning up for any entries marked for deletion.
//# void Rehash();
//# override StreamOut;
//# // Stream stuff
//# // virtual TStream& operator>>=(TStream& towhere) const;
//#
//# override StreamIn;
//# // Stream stuff
//# // virtual TStream& operator<<=(TStream& towhere);
#ifdef __SOMIDL__
implementation {
releaseorder: somfDifferenceS,somfDifferenceSS,
somfIntersectionS,somfIntersectionSS,somfUnionS,somfUnionSS,
somfXorS,somfXorSS,somfSetHashFunction,
somfGetHashFunction,somfRehash,somfFind,somfMakeNewTable,
somfCopyIn,somfGrow,somfAssign,somfTSetInitFL,somfTSetInitF,
somfTSetInitLF,somfTSetInitL,somfTSetInitS;
//# Class Modifiers
majorversion = 2;
minorversion = 1;
filestem = tset;
dllname = "somuc.dll";
passthru C_xh_after = ""
""
"#include <titeratr.xh>"
"#include <mcollect.xh>";
passthru C_h_after = ""
""
"#include <titeratr.h>"
"#include <mcollect.h>";
//# Internal Instance Variables
long fTableSize; // Actual size of the table
long fSize; // Number of entries in the table
long fNextRehash;
TSAssoc fTable;
somf_MCollectible::somf_MCollectibleHashFn fHashfn;
unsigned long fSeed; // Count of operations on the Set. Used by Iterator
ESetClassification fFast;
somf_MCollectible fCache; // Single entry, if table not created yet
//# Method Modifiers
somInit: override;
somUninit: override;
somfAdd: override;
somfRemove: override;
somfRemoveAll: override;
somfDeleteAll: override;
somfCount: override;
somfIntersectionSS: nomodify;
somfUnionSS: nomodify;
somfXorSS: nomodify;
somfMember: override,nomodify;
somfCreateIterator: override, nomodify;
somfGetHashFunction: nomodify;
somfRehash: nooverride;
somfTSetInitFL: nooverride;
somfTSetInitF: nooverride;
somfTSetInitLF: nooverride;
somfTSetInitL: nooverride;
somfTSetInitS: nooverride;
//# Data Modifiers
};
#endif /* __SOMIDL__ */
};
#endif /* TSet_idl */