mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 08:26:27 +00:00
File deleted.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1446 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a131f7d913
commit
2b60d4a541
3 changed files with 0 additions and 218 deletions
|
@ -1,41 +0,0 @@
|
|||
/* Code for interface of Objective-C EltNode objects
|
||||
Copyright (C) 1993,1994 Free Software Foundation, Inc.
|
||||
|
||||
Written by: R. Andrew McCallum <mccallum@cs.rochester.edu>
|
||||
Dept. of Computer Science, U. of Rochester, Rochester, NY 14627
|
||||
|
||||
This file is part of the GNU Objective-C library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
/* This file gets included in all the ...EltNode.h files
|
||||
Doing this silly #include stuff is a poor substitute for multiple
|
||||
inheritance. sigh.
|
||||
|
||||
Pattern:
|
||||
|
||||
@interface FooEltNode : FooNode
|
||||
#include <objects/EltNode-h>
|
||||
@end
|
||||
*/
|
||||
|
||||
|
||||
<EltHolding>
|
||||
{
|
||||
elt _element;
|
||||
int (*_elt_comparison_function)(elt,elt);
|
||||
}
|
||||
- (int(*)(elt,elt)) comparisonFunction;
|
|
@ -1,110 +0,0 @@
|
|||
/* Code for implementation for Objective-C EltNode objects
|
||||
Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
|
||||
|
||||
Written by: R. Andrew McCallum <mccallum@cs.rochester.edu>
|
||||
Dept. of Computer Science, U. of Rochester, Rochester, NY 14627
|
||||
|
||||
This file is part of the GNU Objective-C library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
/* This file gets included in all the ...EltNode.m files.
|
||||
Doing this silly #include stuff is a poor substitute for multiple
|
||||
inheritance. sigh.
|
||||
|
||||
Pattern:
|
||||
|
||||
@implementation FooEltNode : FooNode
|
||||
#include <objects/EltNode-m>
|
||||
@end
|
||||
*/
|
||||
|
||||
#include <objects/eltfuncs.h>
|
||||
#include <objects/NSString.h>
|
||||
|
||||
- initElement: (elt)anElement
|
||||
encoding: (const char *)eltEncoding
|
||||
{
|
||||
[super init];
|
||||
_element = anElement;
|
||||
_elt_comparison_function = elt_get_comparison_function(eltEncoding);
|
||||
return self;
|
||||
}
|
||||
|
||||
/* Archiving must mimic the above designated initializer */
|
||||
|
||||
- (void) encodeWithCoder: aCoder
|
||||
{
|
||||
const char *encoding;
|
||||
|
||||
[super encodeWithCoder:aCoder];
|
||||
encoding = elt_get_encoding(_elt_comparison_function);
|
||||
[aCoder encodeValueOfCType:@encode(char*) at:&encoding
|
||||
withName:@"EltNode Content Type Encoding"];
|
||||
[aCoder encodeValueOfCType:encoding
|
||||
at:elt_get_ptr_to_member(encoding, &_element)
|
||||
withName:@"EltNode Content Element"];
|
||||
}
|
||||
|
||||
- (elt*) _elementDataPtr
|
||||
{
|
||||
return &_element;
|
||||
}
|
||||
|
||||
- (int(**)(elt,elt)) _eltComparisonFunctionPtr
|
||||
{
|
||||
return &_elt_comparison_function;
|
||||
}
|
||||
|
||||
- initWithCoder: aCoder
|
||||
{
|
||||
char *encoding;
|
||||
|
||||
[super initWithCoder:aCoder];
|
||||
[aCoder decodeValueOfCType:@encode(char*)
|
||||
at:&encoding
|
||||
withName:NULL];
|
||||
*[self _eltComparisonFunctionPtr] = elt_get_comparison_function(encoding);
|
||||
[aCoder decodeValueOfCType:encoding
|
||||
at:[self _elementDataPtr]
|
||||
withName:NULL];
|
||||
return self;
|
||||
}
|
||||
|
||||
- (int(*)(elt,elt)) comparisonFunction
|
||||
{
|
||||
return _elt_comparison_function;
|
||||
}
|
||||
|
||||
- (elt) elementData
|
||||
{
|
||||
return _element;
|
||||
}
|
||||
|
||||
- (int) compare: anotherObject
|
||||
{
|
||||
/* perhaps we should do more checking first */
|
||||
return _elt_comparison_function(_element, [anotherObject elementData]);
|
||||
}
|
||||
|
||||
- printForDebugger
|
||||
{
|
||||
elt_fprintf_elt(stdout,
|
||||
elt_get_encoding(_elt_comparison_function),
|
||||
_element);
|
||||
printf("\n");
|
||||
return self;
|
||||
}
|
|
@ -1,67 +0,0 @@
|
|||
/* Interface for Objective-C EltNodeCollector collection object
|
||||
Copyright (C) 1993,1994 Free Software Foundation, Inc.
|
||||
|
||||
Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
|
||||
Date: May 1993
|
||||
|
||||
This file is part of the GNU Objective C Class Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
/* EltNodeCollector */
|
||||
|
||||
#ifndef __EltNodeCollector_h_INCLUDE_GNU
|
||||
#define __EltNodeCollector_h_INCLUDE_GNU
|
||||
|
||||
#include <gnustep/base/preface.h>
|
||||
#include <gnustep/base/IndexedCollection.h>
|
||||
|
||||
/* Protocol for a node that also holds an element */
|
||||
@protocol EltHolding
|
||||
- initElement: (elt)anElement
|
||||
encoding: (const char *)eltEncoding;
|
||||
- (elt) elementData;
|
||||
@end
|
||||
|
||||
|
||||
/* It's is a bit unfortunate that we insist that the underlying
|
||||
collector conform to IndexedCollecting. */
|
||||
|
||||
@interface EltNodeCollector : IndexedCollection
|
||||
{
|
||||
@private
|
||||
id _contents_collector;
|
||||
id _node_class;
|
||||
int (*_comparison_function)(elt,elt);
|
||||
}
|
||||
|
||||
|
||||
- initWithType: (const char *)contentEncoding
|
||||
nodeCollector: aNodeCollector
|
||||
nodeClass: aNodeClass;
|
||||
|
||||
// The class of the autocreated link objects, must conform to <EltHolding>;
|
||||
- eltNodeClass;
|
||||
|
||||
// Getting the underlying node collector that holds the contents;
|
||||
- contentsCollector;
|
||||
|
||||
// Finding the node that contains anElement;
|
||||
- (id <EltHolding>) eltNodeWithElement: (elt)anElement;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* __EltNodeCollector_h_INCLUDE_GNU */
|
Loading…
Reference in a new issue