mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Documentation tidyups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14252 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
caea6bb935
commit
f57005916c
6 changed files with 36 additions and 22 deletions
|
@ -134,4 +134,8 @@
|
||||||
sinceDate: (NSDate*)date;
|
sinceDate: (NSDate*)date;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
#ifndef NO_GNUSTEP
|
||||||
|
NSTimeInterval GSTime(int d, int m, int y, int hh, int mm, int ss, int mil);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __NSCalendarDate_h_GNUSTEP_BASE_INCLUDE*/
|
#endif /* __NSCalendarDate_h_GNUSTEP_BASE_INCLUDE*/
|
||||||
|
|
|
@ -97,18 +97,7 @@ typedef double NSTimeInterval;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifndef NO_GNUSTEP
|
#ifndef NO_GNUSTEP
|
||||||
/*
|
|
||||||
* Our concrete base class - NSCalendar date must share the ivar layout.
|
|
||||||
*/
|
|
||||||
@interface NSGDate : NSDate
|
|
||||||
{
|
|
||||||
@public
|
|
||||||
NSTimeInterval _seconds_since_ref;
|
|
||||||
}
|
|
||||||
@end
|
|
||||||
|
|
||||||
NSTimeInterval GSTimeNow(); /* Get time since reference date*/
|
NSTimeInterval GSTimeNow(); /* Get time since reference date*/
|
||||||
NSTimeInterval GSTime(int d, int m, int y, int hh, int mm, int ss, int mil);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __NSDate_h_GNUSTEP_BASE_INCLUDE*/
|
#endif /* __NSDate_h_GNUSTEP_BASE_INCLUDE*/
|
||||||
|
|
|
@ -387,13 +387,16 @@ GS_EXPORT NSRecursiveLock *gnustep_global_lock;
|
||||||
* objective-c method if the receiver is not nil.
|
* objective-c method if the receiver is not nil.
|
||||||
*/
|
*/
|
||||||
#ifndef TEST_RETAIN
|
#ifndef TEST_RETAIN
|
||||||
#define TEST_RETAIN(object) (object != nil ? [object retain] : nil)
|
#define TEST_RETAIN(object) ({\
|
||||||
|
id __object = (id)(object); (__object != nil) ? [__object retain] : nil; })
|
||||||
#endif
|
#endif
|
||||||
#ifndef TEST_RELEASE
|
#ifndef TEST_RELEASE
|
||||||
#define TEST_RELEASE(object) ({ if (object) [object release]; })
|
#define TEST_RELEASE(object) ({\
|
||||||
|
id __object = (id)(object); if (__object != nil) [__object retain]; })
|
||||||
#endif
|
#endif
|
||||||
#ifndef TEST_AUTORELEASE
|
#ifndef TEST_AUTORELEASE
|
||||||
#define TEST_AUTORELEASE(object) ({ if (object) [object autorelease]; })
|
#define TEST_AUTORELEASE(object) ({\
|
||||||
|
id __object = (id)(object); (__object != nil) ? [__object autorelease] : nil; })
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -420,12 +423,12 @@ if (__value != __object) \
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ASSIGNCOPY(object,value) assignes a copy of the value to the object with
|
* ASSIGNCOPY(object,value) assigns a copy of the value to the object
|
||||||
* and release operations.
|
* with release of the original.
|
||||||
*/
|
*/
|
||||||
#ifndef ASSIGNCOPY
|
#ifndef ASSIGNCOPY
|
||||||
#define ASSIGNCOPY(object,value) ({\
|
#define ASSIGNCOPY(object,value) ({\
|
||||||
id __value = (value); \
|
id __value = (id)(value); \
|
||||||
id __object = (id)(object); \
|
id __object = (id)(object); \
|
||||||
if (__value != __object) \
|
if (__value != __object) \
|
||||||
{ \
|
{ \
|
||||||
|
|
|
@ -368,6 +368,7 @@ DOCUMENT_NAME = Base
|
||||||
|
|
||||||
Base_HEADER_FILES_DIR = $(HEADER_DIR)
|
Base_HEADER_FILES_DIR = $(HEADER_DIR)
|
||||||
Base_AGSDOC_FILES = Base.gsdoc $(AUTOGSDOC_HEADERS)
|
Base_AGSDOC_FILES = Base.gsdoc $(AUTOGSDOC_HEADERS)
|
||||||
|
Base_DOC_INSTALL_DIR = Developer
|
||||||
Base_AGSDOC_FLAGS = \
|
Base_AGSDOC_FLAGS = \
|
||||||
-HeaderDirectory ../Headers/Foundation \
|
-HeaderDirectory ../Headers/Foundation \
|
||||||
-Declared Foundation \
|
-Declared Foundation \
|
||||||
|
|
|
@ -89,8 +89,10 @@ absoluteGregorianDay(int day, int month, int year)
|
||||||
+ (year - 1)/400); // ...plus prior years divisible by 400
|
+ (year - 1)/400); // ...plus prior years divisible by 400
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* External - so NSDate can use it.
|
* Convert a broken out time specification into a time interval
|
||||||
|
* since the reference date.<br />
|
||||||
|
* External - so NSDate and others can use it.
|
||||||
*/
|
*/
|
||||||
NSTimeInterval
|
NSTimeInterval
|
||||||
GSTime(int day, int month, int year, int h, int m, int s, int mil)
|
GSTime(int day, int month, int year, int h, int m, int s, int mil)
|
||||||
|
@ -116,6 +118,8 @@ GSTime(int day, int month, int year, int h, int m, int s, int mil)
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@class NSGDate;
|
||||||
|
|
||||||
@implementation NSCalendarDate
|
@implementation NSCalendarDate
|
||||||
|
|
||||||
+ (void) initialize
|
+ (void) initialize
|
||||||
|
@ -127,9 +131,9 @@ GSTime(int day, int month, int year, int h, int m, int s, int mil)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
/**
|
||||||
// Getting an NSCalendar Date
|
* Getting an NSCalendar Date
|
||||||
//
|
*/
|
||||||
+ (id) calendarDate
|
+ (id) calendarDate
|
||||||
{
|
{
|
||||||
id d = [[self alloc] init];
|
id d = [[self alloc] init];
|
||||||
|
|
|
@ -71,6 +71,16 @@ static Class abstractClass = nil;
|
||||||
static Class concreteClass = nil;
|
static Class concreteClass = nil;
|
||||||
static Class calendarClass = nil;
|
static Class calendarClass = nil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Our concrete base class - NSCalendar date must share the ivar layout.
|
||||||
|
*/
|
||||||
|
@interface NSGDate : NSDate
|
||||||
|
{
|
||||||
|
@public
|
||||||
|
NSTimeInterval _seconds_since_ref;
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
||||||
@interface GSDateSingle : NSGDate
|
@interface GSDateSingle : NSGDate
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -117,6 +127,9 @@ otherTime(NSDate* other)
|
||||||
return [other timeIntervalSinceReferenceDate];
|
return [other timeIntervalSinceReferenceDate];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the current time (seconds since reference date) as an NSTimeInterval.
|
||||||
|
*/
|
||||||
NSTimeInterval
|
NSTimeInterval
|
||||||
GSTimeNow()
|
GSTimeNow()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue