]> err.no Git - sope/blobdiff - sope-core/NGExtensions/NGExtensions/NSObject+Values.h
fixed a gcc4 warning
[sope] / sope-core / NGExtensions / NGExtensions / NSObject+Values.h
index de085da79a495b9b6aa23df0f8c4f4031b6705c2..4750c3c1c8c9aa0352318a987a3be5217b9f8294 100644 (file)
 #import <Foundation/NSObject.h>
 #import <Foundation/NSString.h>
 
-@interface NSObject(NGValues)
+@protocol NGBaseTypeValues
 
-- (BOOL)boolValue; // this returns always YES (the id != nil)
+- (BOOL)boolValue;
 
-// these methods perform their operation on the string-representation of the object
-- (char)charValue;
+- (signed char)charValue;
 - (unsigned char)unsignedCharValue;
-- (short)shortValue;
+- (signed short)shortValue;
 - (unsigned short)unsignedShortValue;
-- (int)intValue;
+- (signed int)intValue;
 - (unsigned int)unsignedIntValue;
-- (long)longValue;
+- (signed long)longValue;
 - (unsigned long)unsignedLongValue;
-- (long long)longLongValue;
+- (signed long long)longLongValue;
 - (unsigned long long)unsignedLongLongValue;
 - (float)floatValue;
+
+@end
+
+/*
+  The default basetype methods perform their operation on the
+  string-representation of the object.
+  
+  -boolValue returns YES per default. (id != nil)
+*/
+@interface NSObject(NGValues) < NGBaseTypeValues >
+
 - (double)doubleValue;
 
 - (NSString *)stringValue;