Use new-style method name "..ValueOfObjCType", instead of

"..ValueOfType".  Use (id <String>) instead of (char *) where
appropriate.
(Encoding -initEncodingOnStream:): Method removed.
(Encoding -initEncoding): Method removed.
(Encoding -encodeValueOfSimpleType:at:withName:): Method removed.
(Decoding -initDecodingOnStream:): Method removed.
(Decoding -initDecoding): Method removed.
(Decoding -decodeValueOfSimpleType:at:withName:): Method removed.
(CommonCoding +defaultFormatVersion): New method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@776 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1996-01-23 23:06:35 +00:00
parent b3f07a0a76
commit c7e63977de
2 changed files with 60 additions and 104 deletions

View file

@ -1,5 +1,5 @@
/* Protocol for GNU Objective-C objects that can write/read to a coder /* Protocol for GNU Objective-C objects that can write/read to a coder
Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu> Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
Date: July 1994 Date: July 1994
@ -25,116 +25,94 @@
#define __Coding_h_OBJECTS_INCLUDE #define __Coding_h_OBJECTS_INCLUDE
#include <objects/stdobjects.h> #include <objects/stdobjects.h>
#include <objects/String.h>
@class Coder; /* xxx remove this eventually */ /* xxx Think about trying to get <String> back in types,
@class Stream; /* xxx remove this eventually */ but now there is a circular dependancy in the include files. */
@protocol CommonCoding @protocol CommonCoding
- (BOOL) isDecoding; - (BOOL) isDecoding;
+ (int) defaultFormatVersion;
+ (int) coderFormatVersion;
+ (int) coderConcreteFormatVersion;
+ (const char *) coderSignature;
- doInitOnStream: (Stream *)s isDecoding: (BOOL)f;
/* Internal designated initializer. Override it, but don't call it yourself.
This method name may change. */
@end @end
@protocol Encoding <CommonCoding> @protocol Encoding <CommonCoding>
- initEncodingOnStream: (Stream *)s; - (void) encodeValueOfObjCType: (const char*)type
- initEncoding;
- (void) encodeValueOfType: (const char*)type
at: (const void*)d at: (const void*)d
withName: (const char *)name; withName: (id /*<String>*/)name;
- (void) encodeWithName: (const char *)name - (void) encodeWithName: (id /*<String>*/)name
valuesOfTypes: (const char *)types, ...; valuesOfObjCTypes: (const char *)types, ...;
- (void) encodeArrayOfType: (const char *)type - (void) encodeArrayOfObjCType: (const char *)type
at: (const void *)d at: (const void *)d
count: (unsigned)c count: (unsigned)c
withName: (const char *)name; withName: (id /*<String>*/)name;
- (void) encodeObject: anObj - (void) encodeObject: anObj
withName: (const char *)name; withName: (id /*<String>*/)name;
- (void) encodeObjectBycopy: anObj - (void) encodeObjectBycopy: anObj
withName: (const char *)name; withName: (id /*<String>*/)name;
- (void) encodeRootObject: anObj - (void) encodeRootObject: anObj
withName: (const char *)name; withName: (id /*<String>*/)name;
- (void) encodeObjectReference: anObj - (void) encodeObjectReference: anObj
withName: (const char *)name; withName: (id /*<String>*/)name;
- (void) startEncodingInterconnectedObjects; - (void) startEncodingInterconnectedObjects;
- (void) finishEncodingInterconnectedObjects; - (void) finishEncodingInterconnectedObjects;
- (void) encodeAtomicString: (const char*)sp - (void) encodeAtomicString: (const char*)sp
withName: (const char*)name; withName: (id /*<String>*/)name;
- (void) encodeClass: aClass; - (void) encodeClass: aClass;
/* For inserting a name into a TextCoder stream */ /* For inserting a name into a TextCoder stream */
- (void) encodeName: (const char*)n; - (void) encodeName: (id /*<String>*/) n;
/* For subclasses that want to keep track of recursion */ /* For classes that want to keep track of recursion */
- (void) encodeIndent; - (void) encodeIndent;
- (void) encodeUnindent; - (void) encodeUnindent;
/* Implemented by concrete subclasses */
- (void) encodeValueOfSimpleType: (const char*)type
at: (const void*)d
withName: (const char *)name;
- (void) encodeBytes: (const char *)b - (void) encodeBytes: (const char *)b
count: (unsigned)c count: (unsigned)c
withName: (const char *)name; withName: (id /*<String>*/)name;
@end @end
@protocol Decoding <CommonCoding> @protocol Decoding <CommonCoding>
- initDecodingOnStream: (Stream *)s; - (void) decodeValueOfObjCType: (const char*)type
- initDecoding;
- (void) decodeValueOfType: (const char*)type
at: (void*)d at: (void*)d
withName: (const char **)namePtr; withName: (id /*<String>*/ *) namePtr;
- (void) decodeWithName: (const char **)name - (void) decodeWithName: (id /*<String>*/*)name
valuesOfTypes: (const char *)types, ...; valuesOfObjCTypes: (const char *) types, ...;
- (void) decodeArrayOfType: (const char *)type - (void) decodeArrayOfObjCType: (const char *)type
at: (void *)d at: (void *)d
count: (unsigned)c count: (unsigned)c
withName: (const char **)name; withName: (id /*<String>*/*)name;
- (void) decodeObjectAt: (id*)anObjPtr - (void) decodeObjectAt: (id*)anObjPtr
withName: (const char **)name; withName: (id /*<String>*/*)name;
- (void) startDecodingInterconnectedObjects; - (void) startDecodingInterconnectedObjects;
- (void) finishDecodingInterconnectedObjects; - (void) finishDecodingInterconnectedObjects;
- (const char *) decodeAtomicStringWithName: (const char **)name; - (const char *) decodeAtomicStringWithName: (id /*<String>*/*) name;
- decodeClass; - decodeClass;
/* For inserting a name into a TextCoder stream */ /* For inserting a name into a TextCoder stream */
- (void) decodeName: (const char**)n; - (void) decodeName: (id /*<String>*/ *)n;
/* For subclasses that want to keep track of recursion */ /* For classes that want to keep track of recursion */
- (void) decodeIndent; - (void) decodeIndent;
- (void) decodeUnindent; - (void) decodeUnindent;
/* Implemented by concrete subclasses */
- (void) decodeValueOfSimpleType: (const char*)type
at: (void*)d
withName: (const char **)namePtr;
- (void) decodeBytes: (char *)b - (void) decodeBytes: (char *)b
count: (unsigned*)c count: (unsigned*)c
withName: (const char **)name; withName: (id /*<String>*/ *) name;
@end @end

View file

@ -1,5 +1,5 @@
/* Protocol for GNU Objective-C objects that can write/read to a coder /* Protocol for GNU Objective-C objects that can write/read to a coder
Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu> Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
Date: July 1994 Date: July 1994
@ -25,116 +25,94 @@
#define __Coding_h_OBJECTS_INCLUDE #define __Coding_h_OBJECTS_INCLUDE
#include <objects/stdobjects.h> #include <objects/stdobjects.h>
#include <objects/String.h>
@class Coder; /* xxx remove this eventually */ /* xxx Think about trying to get <String> back in types,
@class Stream; /* xxx remove this eventually */ but now there is a circular dependancy in the include files. */
@protocol CommonCoding @protocol CommonCoding
- (BOOL) isDecoding; - (BOOL) isDecoding;
+ (int) defaultFormatVersion;
+ (int) coderFormatVersion;
+ (int) coderConcreteFormatVersion;
+ (const char *) coderSignature;
- doInitOnStream: (Stream *)s isDecoding: (BOOL)f;
/* Internal designated initializer. Override it, but don't call it yourself.
This method name may change. */
@end @end
@protocol Encoding <CommonCoding> @protocol Encoding <CommonCoding>
- initEncodingOnStream: (Stream *)s; - (void) encodeValueOfObjCType: (const char*)type
- initEncoding;
- (void) encodeValueOfType: (const char*)type
at: (const void*)d at: (const void*)d
withName: (const char *)name; withName: (id /*<String>*/)name;
- (void) encodeWithName: (const char *)name - (void) encodeWithName: (id /*<String>*/)name
valuesOfTypes: (const char *)types, ...; valuesOfObjCTypes: (const char *)types, ...;
- (void) encodeArrayOfType: (const char *)type - (void) encodeArrayOfObjCType: (const char *)type
at: (const void *)d at: (const void *)d
count: (unsigned)c count: (unsigned)c
withName: (const char *)name; withName: (id /*<String>*/)name;
- (void) encodeObject: anObj - (void) encodeObject: anObj
withName: (const char *)name; withName: (id /*<String>*/)name;
- (void) encodeObjectBycopy: anObj - (void) encodeObjectBycopy: anObj
withName: (const char *)name; withName: (id /*<String>*/)name;
- (void) encodeRootObject: anObj - (void) encodeRootObject: anObj
withName: (const char *)name; withName: (id /*<String>*/)name;
- (void) encodeObjectReference: anObj - (void) encodeObjectReference: anObj
withName: (const char *)name; withName: (id /*<String>*/)name;
- (void) startEncodingInterconnectedObjects; - (void) startEncodingInterconnectedObjects;
- (void) finishEncodingInterconnectedObjects; - (void) finishEncodingInterconnectedObjects;
- (void) encodeAtomicString: (const char*)sp - (void) encodeAtomicString: (const char*)sp
withName: (const char*)name; withName: (id /*<String>*/)name;
- (void) encodeClass: aClass; - (void) encodeClass: aClass;
/* For inserting a name into a TextCoder stream */ /* For inserting a name into a TextCoder stream */
- (void) encodeName: (const char*)n; - (void) encodeName: (id /*<String>*/) n;
/* For subclasses that want to keep track of recursion */ /* For classes that want to keep track of recursion */
- (void) encodeIndent; - (void) encodeIndent;
- (void) encodeUnindent; - (void) encodeUnindent;
/* Implemented by concrete subclasses */
- (void) encodeValueOfSimpleType: (const char*)type
at: (const void*)d
withName: (const char *)name;
- (void) encodeBytes: (const char *)b - (void) encodeBytes: (const char *)b
count: (unsigned)c count: (unsigned)c
withName: (const char *)name; withName: (id /*<String>*/)name;
@end @end
@protocol Decoding <CommonCoding> @protocol Decoding <CommonCoding>
- initDecodingOnStream: (Stream *)s; - (void) decodeValueOfObjCType: (const char*)type
- initDecoding;
- (void) decodeValueOfType: (const char*)type
at: (void*)d at: (void*)d
withName: (const char **)namePtr; withName: (id /*<String>*/ *) namePtr;
- (void) decodeWithName: (const char **)name - (void) decodeWithName: (id /*<String>*/*)name
valuesOfTypes: (const char *)types, ...; valuesOfObjCTypes: (const char *) types, ...;
- (void) decodeArrayOfType: (const char *)type - (void) decodeArrayOfObjCType: (const char *)type
at: (void *)d at: (void *)d
count: (unsigned)c count: (unsigned)c
withName: (const char **)name; withName: (id /*<String>*/*)name;
- (void) decodeObjectAt: (id*)anObjPtr - (void) decodeObjectAt: (id*)anObjPtr
withName: (const char **)name; withName: (id /*<String>*/*)name;
- (void) startDecodingInterconnectedObjects; - (void) startDecodingInterconnectedObjects;
- (void) finishDecodingInterconnectedObjects; - (void) finishDecodingInterconnectedObjects;
- (const char *) decodeAtomicStringWithName: (const char **)name; - (const char *) decodeAtomicStringWithName: (id /*<String>*/*) name;
- decodeClass; - decodeClass;
/* For inserting a name into a TextCoder stream */ /* For inserting a name into a TextCoder stream */
- (void) decodeName: (const char**)n; - (void) decodeName: (id /*<String>*/ *)n;
/* For subclasses that want to keep track of recursion */ /* For classes that want to keep track of recursion */
- (void) decodeIndent; - (void) decodeIndent;
- (void) decodeUnindent; - (void) decodeUnindent;
/* Implemented by concrete subclasses */
- (void) decodeValueOfSimpleType: (const char*)type
at: (void*)d
withName: (const char **)namePtr;
- (void) decodeBytes: (char *)b - (void) decodeBytes: (char *)b
count: (unsigned*)c count: (unsigned*)c
withName: (const char **)name; withName: (id /*<String>*/ *) name;
@end @end