gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GDL2 - patches for OSX (1)


From: Stéphane Corthésy
Subject: GDL2 - patches for OSX (1)
Date: Tue, 25 Mar 2003 22:34:17 +0100

Hi,

I have some patches to help compiling GDL2 on OSX, and which also correct some bugs. As I have lots of modified files, I'll send them in small packets.

Stéphane

Changelog:

EOControl/EODefines.h: new file providing macros for the "extern" clause
EOControl/EODeprecated.h: new file declaring some deprecated methods/classes/symbols; methods/classes/symbols are still implemented but should no longer be used; they are no longer declared in their respective header files. EOControl/EOControl.h: added EODeprecated.h, EODefines.h, EOKeyValueCodingBase.h and EOArrayDataSource.h; removed EOUndoManager.h (deprecated) EOControl/EOArrayDataSource.h/m: new files; some methods (<NSCoding> and qualifier bindings) are empty stubs


EODefines.h

/*
   EODefines.h

   Copyright (C) 2003 Free Software Foundation, Inc.

   Author: Stephane Corthesy <address@hidden>
   Date: Feb 2003

   This file is part of the GNUstep Database 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; see the file COPYING.LIB.
   If not, write to the Free Software Foundation,
   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#ifndef __EODefines_h__
#define __EODefines_h__

#ifdef EOCONTROL_WITH_DLL

#if BUILD_EOCONTROL_DLL
#  define EOCONTROL_EXPORT  __declspec(dllexport)
#  define EOCONTROL_DECLARE __declspec(dllexport)
#else
#  define EOCONTROL_EXPORT  extern __declspec(dllimport)
#  define EOCONTROL_DECLARE __declspec(dllimport)
#endif

#else /* EOCONTROL_WITH[OUT]_DLL */

#  define EOCONTROL_EXPORT extern
#  define EOCONTROL_DECLARE

#endif

#endif

----
EODeprecated.h

/*
 EODeprecated.h

 Copyright (C) 2003 Free Software Foundation, Inc.

 Author: Stephane Corthesy <address@hidden>
 Date: Feb 2003

 This file is part of the GNUstep Database 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; see the file COPYING.LIB.
 If not, write to the Free Software Foundation,
 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#ifndef __EODeprecated_h__
#define __EODeprecated_h__

#import <EOControl/EOUndoManager.h>
#import <EOControl/EODefines.h>
#import <EOControl/EOFetchSpecification.h>


EOCONTROL_EXPORT NSString *EOPrefetchingRelationshipHintKey;
EOCONTROL_EXPORT NSString *EOFetchLimitHintKey;
EOCONTROL_EXPORT NSString *EOPromptAfterFetchLimitHintKey;


@interface EOFetchSpecification(EODeprecated)

- (void)setRawAttributeKeys: (NSArray *)rawAttributeKeys;
- (NSArray *)rawAttributeKeys;
- (void)setAllVariablesRequiredFromBindings: (BOOL)allVariablesRequired;
- (BOOL)allVariablesRequiredFromBindings;

@end

#endif

---
Index: EOControl.h
===================================================================
RCS file: /cvsroot/gnustep/gnustep/dev-libs/gdl2/EOControl/EOControl.h,v
retrieving revision 1.4
diff -r1.4 EOControl.h
30a31
> #import <EOControl/EODefines.h>
36c37
< #import <EOControl/EOQualifier.h>
---
> #import <EOControl/EOKeyValueCodingBase.h>
37a39
> #import <EOControl/EOQualifier.h>
41d42
< #import <EOControl/EOUndoManager.h>
46a48
> #import <EOControl/EOArrayDataSource.h>

---
EOArrayDataSource.m

/*
 EOArrayDataSource.m

 Copyright (C) 2003 Free Software Foundation, Inc.

 Author: Stephane Corthesy <address@hidden>
 Date: March 2003

 This file is part of the GNUstep Database 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; see the file COPYING.LIB.
 If not, write to the Free Software Foundation,
 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#import "EOArrayDataSource.h"
#import <EOControl/EOClassDescription.h>
#import <EOControl/EOEditingContext.h>
#import <EOControl/EODetailDataSource.h>


@implementation EOArrayDataSource

- (id) initWithClassDescription:(EOClassDescription *)classDescription editingContext:(EOEditingContext *)context
{
    // Either argument may be nil
    if(self = [self init]){
        _classDescription = RETAIN(classDescription);
        _context = RETAIN(context);
        _objects = [[NSMutableArray allocWithZone:[self zone]] init];
    }

    return self;
}

- (void) dealloc
{
        DESTROY(_objects);
    DESTROY(_context);
    DESTROY(_classDescription);

    [super dealloc];
}

- (void) encodeWithCoder:(NSCoder *)encoder
{
    /*
    [encoder encodeObject:_objects];
    [encoder encodeObject:_context];
    [encoder encodeObject:_classDescription];
     */
}

- (id) initWithCoder:(NSCoder *)decoder
{
    /*
    _objects = RETAIN([decoder decodeObject]);
    _context = RETAIN([decoder decodeObject]);
    _classDescription = RETAIN([decoder decodeObject]);
     */
    return self;
}

- (void) insertObject:(id)object
{
    [_objects addObject:object];
}

- (void) deleteObject:(id)object
{
    [[self editingContext] deleteObject:object];
    [_objects removeObject:object];
}

- (NSArray *) fetchObjects
{
    return [NSArray arrayWithArray:_objects];
}

- (EOEditingContext *) editingContext
{
    return _context;
}

- (void) qualifyWithRelationshipKey:(NSString *)key ofObject:(id)sourceObject
{
    // Do nothing
}

- (EODataSource *) dataSourceQualifiedByKey:(NSString *)key
{
return [EODetailDataSource detailDataSourceWithMasterDataSource:self detailKey:key];
}

- (EOClassDescription *) classDescriptionForObjects
{
    return _classDescription;
}

- (NSArray *) qualifierBindingKeys
{
    // Don't know what to do
    return nil;
}

- (void) setQualifierBindings: (NSDictionary *)bindings
{
    // Don't know what to do
}

- (NSDictionary *) qualifierBindings
{
    // Don't know what to do
    return nil;
}

- (void) setArray:(NSArray *)array
{
    [_objects setArray:array];
}

@end

---
EOArrayDataSource.h

/*
 EOArrayDataSource.h

 Copyright (C) 2003 Free Software Foundation, Inc.

 Author: Stephane Corthesy <address@hidden>
 Date: March 2003

 This file is part of the GNUstep Database 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; see the file COPYING.LIB.
 If not, write to the Free Software Foundation,
 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#ifndef __EOArrayDataSource_h__
#define __EOArrayDataSource_h__

#import <EOControl/EODataSource.h>


@interface EOArrayDataSource : EODataSource <NSCoding>
{
    NSMutableArray              *_objects;
    EOEditingContext    *_context;
    EOClassDescription  *_classDescription;
}

- (id) initWithClassDescription:(EOClassDescription *)classDescription editingContext:(EOEditingContext *)context;

- (void) setArray:(NSArray *)array;

@end

#endif





reply via email to

[Prev in Thread] Current Thread [Next in Thread]