2002-11-15 22:57:05 +00:00
|
|
|
/**
|
|
|
|
EONull.m <title>EONull Class</title>
|
|
|
|
|
2005-08-17 08:07:57 +00:00
|
|
|
Copyright (C) 1996-2002,2003,2004,2005 Free Software Foundation, Inc.
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
Author: Mircea Oancea <mircea@jupiter.elcom.pub.ro>
|
|
|
|
Date: 1996
|
|
|
|
|
2006-09-14 16:06:21 +00:00
|
|
|
Author: Mirko Viviani <mirko.viviani@gmail.com>
|
2002-11-15 22:57:05 +00:00
|
|
|
Date: February 2000
|
|
|
|
|
|
|
|
$Revision$
|
|
|
|
$Date$
|
|
|
|
|
|
|
|
<abstract></abstract>
|
|
|
|
|
|
|
|
This file is part of the GNUstep Database Library.
|
|
|
|
|
|
|
|
<license>
|
|
|
|
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
|
2007-07-12 06:39:22 +00:00
|
|
|
version 3 of the License, or (at your option) any later version.
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
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,
|
2005-08-17 08:07:57 +00:00
|
|
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2002-11-15 22:57:05 +00:00
|
|
|
</license>
|
|
|
|
**/
|
|
|
|
|
2002-12-31 16:25:21 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
RCS_ID("$Id$")
|
2002-11-15 22:57:05 +00:00
|
|
|
|
2004-03-19 16:41:21 +00:00
|
|
|
#ifdef GNUSTEP
|
2003-08-24 23:28:26 +00:00
|
|
|
#include <Foundation/NSString.h>
|
2003-03-31 00:24:15 +00:00
|
|
|
#else
|
|
|
|
#include <Foundation/Foundation.h>
|
|
|
|
#endif
|
2002-12-30 23:00:10 +00:00
|
|
|
|
2003-07-11 19:04:05 +00:00
|
|
|
#ifndef GNUSTEP
|
2003-08-25 20:01:59 +00:00
|
|
|
#include <GNUstepBase/GNUstep.h>
|
2003-07-11 19:04:05 +00:00
|
|
|
#endif
|
|
|
|
|
2003-03-31 00:24:15 +00:00
|
|
|
#include <EOControl/EONull.h>
|
|
|
|
#include <EOControl/EODebug.h>
|
2002-12-30 22:10:43 +00:00
|
|
|
|
2002-11-15 22:57:05 +00:00
|
|
|
|
2003-08-24 23:28:26 +00:00
|
|
|
@implementation EONull (EOSQLFormatting)
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
- (NSString *)sqlString
|
|
|
|
{
|
2010-05-30 19:25:53 +00:00
|
|
|
|
|
|
|
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
return @"NULL";
|
|
|
|
}
|
|
|
|
|
2003-03-31 00:24:15 +00:00
|
|
|
//OK
|
2002-11-15 22:57:05 +00:00
|
|
|
- (id)valueForKey:(NSString *)key
|
|
|
|
{
|
|
|
|
return self;
|
2003-03-31 00:24:15 +00:00
|
|
|
}
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
2003-08-24 23:28:26 +00:00
|
|
|
/*
|
|
|
|
* We keep this class to support NSClassFromString() which
|
2005-02-14 17:44:00 +00:00
|
|
|
* scripting libraries may depend on. Note that this is
|
2003-08-24 23:28:26 +00:00
|
|
|
* not a fail-safe implementation. You should rely on
|
|
|
|
* [EONull+null] and pointer comparison. Do not rely on
|
|
|
|
* [obj isKindOfClass: NSClassFromString(@"EONull")]
|
|
|
|
* or similar constructs. They will return wrong results.
|
|
|
|
* This is a small backdraw from using the new extension classes
|
|
|
|
* in base / Foundation.
|
|
|
|
*/
|
|
|
|
#undef EONull
|
|
|
|
@interface EONull : NSNull
|
|
|
|
@end
|
|
|
|
@implementation EONull
|
|
|
|
+ (Class) class
|
|
|
|
{
|
|
|
|
return [NSNull class];
|
|
|
|
}
|
|
|
|
|
|
|
|
+ (id) allocWithZone: (NSZone *)zone
|
|
|
|
{
|
|
|
|
return [NSNull null];
|
|
|
|
}
|
|
|
|
|
|
|
|
+ null
|
|
|
|
{
|
|
|
|
return [NSNull null];
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|
|
|
|
|