ObjectInStream.h

00001 //
00002 // $Id: ObjectInStream.h,v 1.16 2007/03/06 20:42:19 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(OBJECTINSTREAM_OL_GUARD)
00044 #define OBJECTINSTREAM_OL_GUARD
00045 
00046 #include <ObjectiveLib/LayeredInStream.h>
00047 
00048 @class OLHashMap;
00049 @class OLSharedPointerTable;
00050 
00063 @interface OLObjectInStream : OLLayeredInStream
00064 {
00065 @protected
00069     OLHashMap*              classes;
00070 
00074     OLSharedPointerTable*   sharedPointers;
00075 
00079     uint32_t                systemVersion;
00080 }
00081 
00089 + (id) streamWithInStream: (OLInStream*)underStream;
00090 
00094 /* @{ */
00102 - (id) initWithInStream: (OLInStream*)underStream;
00103 #if !defined(OL_NO_OPENSTEP)
00104 - (void) dealloc;
00105 #endif
00106 /* @} */
00107 
00120 - (unsigned) classVersion: (const char*)className;
00121 #if defined(OL_NO_OPENSTEP)
00122 - (void) freeStreamResources;
00123 #endif
00124 - (BOOL) readBool;
00125 
00134 - (Class) readClass;
00135 - (double) readDouble;
00136 - (float) readFloat;
00137 
00148 - (void) readHeader;
00149 - (unsigned) readInt;
00150 - (uint16_t) readInt16;
00151 - (uint32_t) readInt32;
00152 - (uint64_t) readInt64;
00153 
00169 - (id) readObject;
00170 
00177 - (unsigned) systemVersion;
00178 
00179 #if !defined(OL_NO_OPENSTEP)
00180 
00185 /* @{ */
00186 - (void*) decodeBytesWithReturnedLength: (unsigned*)numBytes;
00187 - (NSData*) decodeDataObject;
00188 
00195 - (id) decodeObject;
00196 
00224 - (void) decodeValueOfObjCType: (const char*)valueType at: (void*)address;
00225 
00238 - (unsigned) versionForClassName: (NSString*)className;
00239 /* @} */
00240 #endif
00241 
00242 @end
00243 
00244 #endif

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