From c7e63977def2ed2e52dc2d7b68b26e553656025d Mon Sep 17 00:00:00 2001 From: Andrew McCallum Date: Tue, 23 Jan 1996 23:06:35 +0000 Subject: [PATCH] Use new-style method name "..ValueOfObjCType", instead of "..ValueOfType". Use (id ) 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 --- Headers/gnustep/base/Coding.h | 82 +++++++++++++---------------------- Source/objects/Coding.h | 82 +++++++++++++---------------------- 2 files changed, 60 insertions(+), 104 deletions(-) diff --git a/Headers/gnustep/base/Coding.h b/Headers/gnustep/base/Coding.h index 1aea638b9..2de20c636 100644 --- a/Headers/gnustep/base/Coding.h +++ b/Headers/gnustep/base/Coding.h @@ -1,5 +1,5 @@ /* 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 Date: July 1994 @@ -25,116 +25,94 @@ #define __Coding_h_OBJECTS_INCLUDE #include +#include -@class Coder; /* xxx remove this eventually */ -@class Stream; /* xxx remove this eventually */ +/* xxx Think about trying to get back in types, + but now there is a circular dependancy in the include files. */ @protocol CommonCoding - - (BOOL) isDecoding; - -+ (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. */ - ++ (int) defaultFormatVersion; @end @protocol Encoding -- initEncodingOnStream: (Stream *)s; -- initEncoding; - -- (void) encodeValueOfType: (const char*)type +- (void) encodeValueOfObjCType: (const char*)type at: (const void*)d - withName: (const char *)name; + withName: (id /**/)name; -- (void) encodeWithName: (const char *)name - valuesOfTypes: (const char *)types, ...; +- (void) encodeWithName: (id /**/)name + valuesOfObjCTypes: (const char *)types, ...; -- (void) encodeArrayOfType: (const char *)type +- (void) encodeArrayOfObjCType: (const char *)type at: (const void *)d count: (unsigned)c - withName: (const char *)name; + withName: (id /**/)name; - (void) encodeObject: anObj - withName: (const char *)name; + withName: (id /**/)name; - (void) encodeObjectBycopy: anObj - withName: (const char *)name; + withName: (id /**/)name; - (void) encodeRootObject: anObj - withName: (const char *)name; + withName: (id /**/)name; - (void) encodeObjectReference: anObj - withName: (const char *)name; + withName: (id /**/)name; - (void) startEncodingInterconnectedObjects; - (void) finishEncodingInterconnectedObjects; - (void) encodeAtomicString: (const char*)sp - withName: (const char*)name; + withName: (id /**/)name; - (void) encodeClass: aClass; /* For inserting a name into a TextCoder stream */ -- (void) encodeName: (const char*)n; +- (void) encodeName: (id /**/) n; -/* For subclasses that want to keep track of recursion */ +/* For classes that want to keep track of recursion */ - (void) encodeIndent; - (void) encodeUnindent; -/* Implemented by concrete subclasses */ -- (void) encodeValueOfSimpleType: (const char*)type - at: (const void*)d - withName: (const char *)name; - (void) encodeBytes: (const char *)b count: (unsigned)c - withName: (const char *)name; + withName: (id /**/)name; @end @protocol Decoding -- initDecodingOnStream: (Stream *)s; -- initDecoding; - -- (void) decodeValueOfType: (const char*)type +- (void) decodeValueOfObjCType: (const char*)type at: (void*)d - withName: (const char **)namePtr; + withName: (id /**/ *) namePtr; -- (void) decodeWithName: (const char **)name - valuesOfTypes: (const char *)types, ...; +- (void) decodeWithName: (id /**/*)name + valuesOfObjCTypes: (const char *) types, ...; -- (void) decodeArrayOfType: (const char *)type +- (void) decodeArrayOfObjCType: (const char *)type at: (void *)d count: (unsigned)c - withName: (const char **)name; + withName: (id /**/*)name; - (void) decodeObjectAt: (id*)anObjPtr - withName: (const char **)name; + withName: (id /**/*)name; - (void) startDecodingInterconnectedObjects; - (void) finishDecodingInterconnectedObjects; -- (const char *) decodeAtomicStringWithName: (const char **)name; +- (const char *) decodeAtomicStringWithName: (id /**/*) name; - decodeClass; /* For inserting a name into a TextCoder stream */ -- (void) decodeName: (const char**)n; +- (void) decodeName: (id /**/ *)n; -/* For subclasses that want to keep track of recursion */ +/* For classes that want to keep track of recursion */ - (void) decodeIndent; - (void) decodeUnindent; -/* Implemented by concrete subclasses */ -- (void) decodeValueOfSimpleType: (const char*)type - at: (void*)d - withName: (const char **)namePtr; - (void) decodeBytes: (char *)b count: (unsigned*)c - withName: (const char **)name; + withName: (id /**/ *) name; @end diff --git a/Source/objects/Coding.h b/Source/objects/Coding.h index 1aea638b9..2de20c636 100644 --- a/Source/objects/Coding.h +++ b/Source/objects/Coding.h @@ -1,5 +1,5 @@ /* 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 Date: July 1994 @@ -25,116 +25,94 @@ #define __Coding_h_OBJECTS_INCLUDE #include +#include -@class Coder; /* xxx remove this eventually */ -@class Stream; /* xxx remove this eventually */ +/* xxx Think about trying to get back in types, + but now there is a circular dependancy in the include files. */ @protocol CommonCoding - - (BOOL) isDecoding; - -+ (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. */ - ++ (int) defaultFormatVersion; @end @protocol Encoding -- initEncodingOnStream: (Stream *)s; -- initEncoding; - -- (void) encodeValueOfType: (const char*)type +- (void) encodeValueOfObjCType: (const char*)type at: (const void*)d - withName: (const char *)name; + withName: (id /**/)name; -- (void) encodeWithName: (const char *)name - valuesOfTypes: (const char *)types, ...; +- (void) encodeWithName: (id /**/)name + valuesOfObjCTypes: (const char *)types, ...; -- (void) encodeArrayOfType: (const char *)type +- (void) encodeArrayOfObjCType: (const char *)type at: (const void *)d count: (unsigned)c - withName: (const char *)name; + withName: (id /**/)name; - (void) encodeObject: anObj - withName: (const char *)name; + withName: (id /**/)name; - (void) encodeObjectBycopy: anObj - withName: (const char *)name; + withName: (id /**/)name; - (void) encodeRootObject: anObj - withName: (const char *)name; + withName: (id /**/)name; - (void) encodeObjectReference: anObj - withName: (const char *)name; + withName: (id /**/)name; - (void) startEncodingInterconnectedObjects; - (void) finishEncodingInterconnectedObjects; - (void) encodeAtomicString: (const char*)sp - withName: (const char*)name; + withName: (id /**/)name; - (void) encodeClass: aClass; /* For inserting a name into a TextCoder stream */ -- (void) encodeName: (const char*)n; +- (void) encodeName: (id /**/) n; -/* For subclasses that want to keep track of recursion */ +/* For classes that want to keep track of recursion */ - (void) encodeIndent; - (void) encodeUnindent; -/* Implemented by concrete subclasses */ -- (void) encodeValueOfSimpleType: (const char*)type - at: (const void*)d - withName: (const char *)name; - (void) encodeBytes: (const char *)b count: (unsigned)c - withName: (const char *)name; + withName: (id /**/)name; @end @protocol Decoding -- initDecodingOnStream: (Stream *)s; -- initDecoding; - -- (void) decodeValueOfType: (const char*)type +- (void) decodeValueOfObjCType: (const char*)type at: (void*)d - withName: (const char **)namePtr; + withName: (id /**/ *) namePtr; -- (void) decodeWithName: (const char **)name - valuesOfTypes: (const char *)types, ...; +- (void) decodeWithName: (id /**/*)name + valuesOfObjCTypes: (const char *) types, ...; -- (void) decodeArrayOfType: (const char *)type +- (void) decodeArrayOfObjCType: (const char *)type at: (void *)d count: (unsigned)c - withName: (const char **)name; + withName: (id /**/*)name; - (void) decodeObjectAt: (id*)anObjPtr - withName: (const char **)name; + withName: (id /**/*)name; - (void) startDecodingInterconnectedObjects; - (void) finishDecodingInterconnectedObjects; -- (const char *) decodeAtomicStringWithName: (const char **)name; +- (const char *) decodeAtomicStringWithName: (id /**/*) name; - decodeClass; /* For inserting a name into a TextCoder stream */ -- (void) decodeName: (const char**)n; +- (void) decodeName: (id /**/ *)n; -/* For subclasses that want to keep track of recursion */ +/* For classes that want to keep track of recursion */ - (void) decodeIndent; - (void) decodeUnindent; -/* Implemented by concrete subclasses */ -- (void) decodeValueOfSimpleType: (const char*)type - at: (void*)d - withName: (const char **)namePtr; - (void) decodeBytes: (char *)b count: (unsigned*)c - withName: (const char **)name; + withName: (id /**/ *) name; @end