ObjFW  Diff

Differences From Artifact [d6e03f82de]:

To Artifact [d5e0f4a58d]:

  • File src/OFNumber.h — part of check-in [48980f2297] at 2015-11-29 11:43:05 on branch trunk — Make properties a requirement and clean up code

    This increases the required GCC version from 4.0 to 4.6 (exception:
    Apple GCC, which already supports this with >= 4.0 starting with OS X
    10.5). Since even GCC 4.6 is really old by now, there is no point in
    still supporting something even older and making the code ugly because
    of that. While some hardware and OS support was dropped from GCC 4.6
    compared to GCC 4.0, there is nothing in there that would be an
    interesting target with the exception of BeOS maybe - but a port to BeOS
    can also be achieved using the Haiku support. The other dropped OSes are
    mostly old versions of OSes while newer ones are still being supported
    (and those newer versions of those OSes still support the same
    hardware). (user: js, size: 20760) [annotate] [blame] [check-ins using]


143
144
145
146
147
148
149
150



151
152
153
154
155
156
157
158
159
		uintptr_t	   uintptr;
		float		   float_;
		double		   double_;
	} _value;
	of_number_type_t _type;
}

#ifdef OF_HAVE_PROPERTIES



@property (readonly) of_number_type_t type;
#endif

/*!
 * @brief Creates a new OFNumber with the specified bool.
 *
 * @param bool_ A bool which the OFNumber should contain
 * @return A new autoreleased OFNumber
 */







<
>
>
>

<







143
144
145
146
147
148
149

150
151
152
153

154
155
156
157
158
159
160
		uintptr_t	   uintptr;
		float		   float_;
		double		   double_;
	} _value;
	of_number_type_t _type;
}


/*!
 * The type of the number.
 */
@property (readonly) of_number_type_t type;


/*!
 * @brief Creates a new OFNumber with the specified bool.
 *
 * @param bool_ A bool which the OFNumber should contain
 * @return A new autoreleased OFNumber
 */
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
 * @brief Initializes an already allocated OFNumber with the specified double.
 *
 * @param double_ A double which the OFNumber should contain
 * @return An initialized OFNumber
 */
- initWithDouble: (double)double_;

/*!
 * @brief Returns the type of the number.
 *
 * @return An of_number_type_t indicating the type of the number
 */
- (of_number_type_t)type;

/*!
 * @brief Returns the OFNumber as a bool.
 *
 * @return The OFNumber as a bool
 */
- (bool)boolValue;








<
<
<
<
<
<
<







609
610
611
612
613
614
615







616
617
618
619
620
621
622
 * @brief Initializes an already allocated OFNumber with the specified double.
 *
 * @param double_ A double which the OFNumber should contain
 * @return An initialized OFNumber
 */
- initWithDouble: (double)double_;








/*!
 * @brief Returns the OFNumber as a bool.
 *
 * @return The OFNumber as a bool
 */
- (bool)boolValue;