mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Byref patches from Frith-MacDonald
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2777 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
60070d1e6e
commit
5f22cd9f54
17 changed files with 218 additions and 30 deletions
|
@ -578,7 +578,7 @@ my_object_is_class(id object)
|
|||
}
|
||||
|
||||
|
||||
/* These next two methods are the designated coder methods called when
|
||||
/* These next three methods are the designated coder methods called when
|
||||
we've determined that the object has not already been
|
||||
encoded---we're not simply going to encode a cross-reference number
|
||||
to the object, we're actually going to encode an object (either a
|
||||
|
@ -611,17 +611,24 @@ my_object_is_class(id object)
|
|||
[encoded_object encodeWithCoder: (id)self];
|
||||
}
|
||||
|
||||
/* This method overridden by ConnectedCoder */
|
||||
/* This method overridden by NSPortCoder */
|
||||
- (void) _doEncodeObject: anObj
|
||||
{
|
||||
[self _doEncodeBycopyObject:anObj];
|
||||
}
|
||||
|
||||
/* This method overridden by NSPortCoder */
|
||||
- (void) _doEncodeByrefObject: anObj
|
||||
{
|
||||
[self _doEncodeObject: anObj];
|
||||
}
|
||||
|
||||
|
||||
/* This is the designated object encoder */
|
||||
- (void) _encodeObject: anObj
|
||||
withName: (NSString*) name
|
||||
isBycopy: (BOOL) bycopy_flag
|
||||
isByref: (BOOL) byref_flag
|
||||
isForwardReference: (BOOL) forward_ref_flag
|
||||
{
|
||||
[self encodeName:name];
|
||||
|
@ -681,6 +688,8 @@ my_object_is_class(id object)
|
|||
[self encodeIndent];
|
||||
if (bycopy_flag)
|
||||
[self _doEncodeBycopyObject:anObj];
|
||||
else if (byref_flag)
|
||||
[self _doEncodeByrefObject:anObj];
|
||||
else
|
||||
[self _doEncodeObject:anObj];
|
||||
[self encodeUnindent];
|
||||
|
@ -730,20 +739,42 @@ my_object_is_class(id object)
|
|||
- (void) encodeObject: anObj
|
||||
withName: (NSString*)name
|
||||
{
|
||||
[self _encodeObject:anObj withName:name isBycopy:NO isForwardReference:NO];
|
||||
[self _encodeObject:anObj
|
||||
withName:name
|
||||
isBycopy:NO
|
||||
isByref:NO
|
||||
isForwardReference:NO];
|
||||
}
|
||||
|
||||
|
||||
- (void) encodeBycopyObject: anObj
|
||||
withName: (NSString*)name
|
||||
{
|
||||
[self _encodeObject:anObj withName:name isBycopy:YES isForwardReference:NO];
|
||||
[self _encodeObject:anObj
|
||||
withName:name
|
||||
isBycopy:YES
|
||||
isByref:NO
|
||||
isForwardReference:NO];
|
||||
}
|
||||
|
||||
- (void) encodeByrefObject: anObj
|
||||
withName: (NSString*)name
|
||||
{
|
||||
[self _encodeObject:anObj
|
||||
withName:name
|
||||
isBycopy:NO
|
||||
isByref:YES
|
||||
isForwardReference:NO];
|
||||
}
|
||||
|
||||
- (void) encodeObjectReference: anObj
|
||||
withName: (NSString*)name
|
||||
{
|
||||
[self _encodeObject:anObj withName:name isBycopy:NO isForwardReference:YES];
|
||||
[self _encodeObject:anObj
|
||||
withName:name
|
||||
isBycopy:NO
|
||||
isByref:NO
|
||||
isForwardReference:YES];
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue