Pair.h

00001 //
00002 // $Id: Pair.h,v 1.18 2007/03/06 20:42:20 will_mason Exp $
00003 //
00004 // vi: set ft=objc:
00005 
00006 /*
00007  * ObjectiveLib - a library of containers and algorithms for Objective-C
00008  *
00009  * Copyright (c) 2004-2007
00010  * Will Mason
00011  *
00012  * Portions:
00013  *
00014  * Copyright (c) 1994
00015  * Hewlett-Packard Company
00016  *
00017  * Copyright (c) 1996,1997
00018  * Silicon Graphics Computer Systems, Inc.
00019  *
00020  * Copyright (c) 1997
00021  * Moscow Center for SPARC Technology
00022  *
00023  * Copyright (c) 1999 
00024  * Boris Fomitchev
00025  *
00026  * This library is free software; you can redistribute it and/or
00027  * modify it under the terms of the GNU Lesser General Public
00028  * License as published by the Free Software Foundation; either
00029  * version 2.1 of the License, or (at your option) any later version.
00030  *
00031  * This library is distributed in the hope that it will be useful,
00032  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00033  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00034  * Lesser General Public License for more details.
00035  *
00036  * You should have received a copy of the GNU Lesser General Public
00037  * License along with this library; if not, write to the Free Software
00038  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00039  *
00040  * You may contact the author at will_mason@users.sourceforge.net.
00041  */
00042 
00043 #if !defined(PAIR_OL_GUARD)
00044 #define PAIR_OL_GUARD
00045 
00046 #include <ObjectiveLib/ObjectBase.h>
00047 
00055 @interface OLPair :
00056 #if defined(OL_NO_OPENSTEP)
00057     Object <OLStreamable>
00058 #else
00059     NSObject <OLStreamable, NSCopying, NSCoding>
00060 #endif
00061 {
00062 @protected
00066     id      first;
00067 
00071     id      second;
00072 }
00073 
00077 /* @{ */
00078 #if !defined(OL_NO_OPENSTEP)
00079 
00089 - (id) initWithCoder: (NSCoder*)decoder;
00090 #endif
00091 
00099 - (id) initWithFirst: (id)f second: (id)s;
00100 
00101 - (id) initWithObjectInStream: (OLObjectInStream*)stream;
00102 
00106 #if defined(OL_NO_OPENSTEP)
00107 - (id) free;
00108 #else
00109 - (void) dealloc;
00110 #endif
00111 /* @} */
00112 
00123 - (int) compare: (id)other;
00124 #if defined(OL_NO_OPENSTEP)
00125 
00130 - (id) copy;
00131 #else
00132 
00138 - (id) copyWithZone: (NSZone*)zone;
00139 #endif
00140 
00141 #if !defined(OL_NO_OPENSTEP)
00142 
00148 - (void) encodeWithCoder: (NSCoder*)encoder;
00149 #endif
00150 
00156 - (id) first;
00157 
00167 - (BOOL) isEqual: (id)object;
00168 
00174 - (id) second;
00175 
00181 - (void) setFirst: (id)f;
00182 
00188 - (void) setSecond: (id)s;
00189 
00190 - (void) writeSelfToStream: (OLObjectOutStream*)stream;
00191 
00192 @end
00193 
00194 #endif

ObjectiveLibGenerated Sun Apr 22 15:17:59 2007, © 2004-2007 Will Mason
SourceForge.net Logo