Declare new methods.

(cstream): New ivar, replacing "stream".
(classname_map): New ivar, but not yet used properly.
(concrete_format_version): ivar removed, this is now in the CStream
classes.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@775 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mccallum 1996-01-23 23:01:24 +00:00
parent 370890e052
commit c269d7d123
2 changed files with 28 additions and 14 deletions

View file

@ -26,31 +26,38 @@
#include <objects/stdobjects.h> #include <objects/stdobjects.h>
#include <objects/Coding.h> #include <objects/Coding.h>
#include <objects/Streaming.h>
#include <objects/String.h>
@class Stream; @class CStream;
@class Dictionary; @class Dictionary;
@class Stack; @class Stack;
@class Array; @class Array; /* xxx Change this to "Set" */
@interface Coder : NSObject <Encoding, Decoding> @interface Coder : NSObject <Encoding, Decoding>
{ {
int format_version; int format_version;
int concrete_format_version; CStream *cstream;
Stream *stream;
BOOL is_decoding; BOOL is_decoding;
Dictionary *classname_map; /* for changing class names on r/w */
Dictionary *object_table; /* read/written objects */ Dictionary *object_table; /* read/written objects */
Dictionary *const_ptr_table; /* read/written const *'s */ Dictionary *const_ptr_table; /* read/written const *'s */
Dictionary *root_object_table; /* table of interconnected objects */ Dictionary *root_object_table; /* table of interconnected objects */
Dictionary *forward_object_table; /* table of forward references */ Dictionary *forward_object_table; /* table of forward references */
Array *in_progress_table; /* objects started r/w, but !finished */ Array *in_progress_table; /* objects started r/w, but !finished */
int interconnected_stack_height; /* number of nested root objects */ int interconnected_stack_height; /* number of nested root objects */
/* Not all these ivars are really necessary. I fixed a bug with
a quick fix; now I need to go back and clean it up. -mccallum */
} }
+ coderReadingFromStream: (id <Streaming>)stream;
+ coderReadingFromFile: (id <String>) filename;
+ decodeObjectFromStream: (id <Streaming>)stream;
+ decodeObjectFromFile: (id <String>) filename;
+ (void) setDefaultStreamClass: sc; + (void) setDefaultStreamClass: sc;
+ defaultStreamClass; + defaultStreamClass;
+ (int) defaultFormatVersion;
+ setDebugging: (BOOL)f; + setDebugging: (BOOL)f;
@end @end

View file

@ -26,31 +26,38 @@
#include <objects/stdobjects.h> #include <objects/stdobjects.h>
#include <objects/Coding.h> #include <objects/Coding.h>
#include <objects/Streaming.h>
#include <objects/String.h>
@class Stream; @class CStream;
@class Dictionary; @class Dictionary;
@class Stack; @class Stack;
@class Array; @class Array; /* xxx Change this to "Set" */
@interface Coder : NSObject <Encoding, Decoding> @interface Coder : NSObject <Encoding, Decoding>
{ {
int format_version; int format_version;
int concrete_format_version; CStream *cstream;
Stream *stream;
BOOL is_decoding; BOOL is_decoding;
Dictionary *classname_map; /* for changing class names on r/w */
Dictionary *object_table; /* read/written objects */ Dictionary *object_table; /* read/written objects */
Dictionary *const_ptr_table; /* read/written const *'s */ Dictionary *const_ptr_table; /* read/written const *'s */
Dictionary *root_object_table; /* table of interconnected objects */ Dictionary *root_object_table; /* table of interconnected objects */
Dictionary *forward_object_table; /* table of forward references */ Dictionary *forward_object_table; /* table of forward references */
Array *in_progress_table; /* objects started r/w, but !finished */ Array *in_progress_table; /* objects started r/w, but !finished */
int interconnected_stack_height; /* number of nested root objects */ int interconnected_stack_height; /* number of nested root objects */
/* Not all these ivars are really necessary. I fixed a bug with
a quick fix; now I need to go back and clean it up. -mccallum */
} }
+ coderReadingFromStream: (id <Streaming>)stream;
+ coderReadingFromFile: (id <String>) filename;
+ decodeObjectFromStream: (id <Streaming>)stream;
+ decodeObjectFromFile: (id <String>) filename;
+ (void) setDefaultStreamClass: sc; + (void) setDefaultStreamClass: sc;
+ defaultStreamClass; + defaultStreamClass;
+ (int) defaultFormatVersion;
+ setDebugging: (BOOL)f; + setDebugging: (BOOL)f;
@end @end