// // HOMObjCValue.h // HigherOrderMessaging // // Created by Ofri Wolfus on 11/28/05. // Copyright 2005 Ofri Wolfus. All rights reserved. // #import /*! * @header HOMObjCValue * HOMObjCValue represents a return value of a method. * @copyright Created by Ofri Wolfus on 11/28/05. Copyright 2004-2005 Ofri Wolfus. All rights reserved. * @updated 2005-11-28 * @version 0.1 */ /*! * @class HOMObjCValue * @abstract HOMObjCValue represents a return value of a method. * @discussion HOMObjCValue is an object wrapper arround the NSObjCValue struct defined in NSInvocation.h. * It is used to hold the return value of an invocation in places that can take only objects (like NSArray). * Note that if you request for a value from other type of that that the receiver contains, the result is not defined. */ @interface HOMObjCValue : NSObject { NSObjCValue value; } /*! * @method valueType * @abstract Returns the type of the value that the receiver holds. */ - (const char *)valueType; /*! * @method charValue * @abstract Returns the char value of the receiver. */ - (char)charValue; /*! * @method BOOLValue * @abstract Returns the BOOL value of the receiver * (which is infact a char and therefor, -BOOLValue is identical to -charValue). */ - (BOOL)BOOLValue; /*! * @method shortValue * @abstract Returns the short value of the receiver. */ - (short)shortValue; /*! * @method longValue * @abstract Returns the long value of the receiver. */ - (long)longValue; /*! * @method longlongValue * @abstract Returns the long long value of the receiver. */ - (long long)longlongValue; /*! * @method floatValue * @abstract Returns the float value of the receiver. */ - (float)floatValue; /*! * @method doubleValue * @abstract Returns the double value of the receiver. */ - (double)doubleValue; /*! * @method boolValue * @abstract Returns the bool value of the receiver. */ - (bool)boolValue; /*! * @method selectorValue * @abstract Returns the SEL value of the receiver. */ - (SEL)selectorValue; /*! * @method objectValue * @abstract Returns the id value of the receiver. */ - (id)objectValue; /*! * @method pointerValue * @abstract Returns the pointer value of the receiver. */ - (void *)pointerValue; /*! * @method structLocation * @abstract Returns a pointer to the location of the struct value of the receiver. */ - (void *)structLocation; /*! * @method cStringLocation * @abstract Returns the c string value of the receiver. */ - (char *)cStringLocation; /*! * @method intValue * @abstract Returns the int value of the receiver. */ - (int)intValue; /*! * @method unsignedIntValue * @abstract Returns the unsigned int value of the receiver. */ - (unsigned int)unsignedIntValue; @end