ObjFW  Diff

Differences From Artifact [2829df2028]:

To Artifact [6fa2f56574]:


9
10
11
12
13
14
15







16
17
18
19
20
21
22
23
24
25
26
27
28
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */








#include <sys/types.h>

#import "OFObject.h"
#import "OFSerialization.h"
#import "OFJSONEncoding.h"

/**
 * \brief The type of a number.
 */
typedef enum of_number_type_t {
	OF_NUMBER_BOOL,
	OF_NUMBER_CHAR,







>
>
>
>
>
>
>





|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#ifndef __STDC_LIMIT_MACROS
# define __STDC_LIMIT_MACROS
#endif
#ifndef __STDC_CONSTANT_MACROS
# define __STDC_CONSTANT_MACROS
#endif

#include <sys/types.h>

#import "OFObject.h"
#import "OFSerialization.h"
#import "OFJSONRepresentation.h"

/**
 * \brief The type of a number.
 */
typedef enum of_number_type_t {
	OF_NUMBER_BOOL,
	OF_NUMBER_CHAR,
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
	OF_NUMBER_FLOAT,
	OF_NUMBER_DOUBLE,
} of_number_type_t;

/**
 * \brief Provides a way to store a number in an object.
 */
@interface OFNumber: OFObject <OFCopying, OFSerialization, OFJSON>
{
	union of_number_value {
		BOOL	       bool_;
		signed char    char_;
		signed short   short_;
		signed int     int_;
		signed long    long_;







|







58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
	OF_NUMBER_FLOAT,
	OF_NUMBER_DOUBLE,
} of_number_type_t;

/**
 * \brief Provides a way to store a number in an object.
 */
@interface OFNumber: OFObject <OFCopying, OFSerialization, OFJSONRepresentation>
{
	union of_number_value {
		BOOL	       bool_;
		signed char    char_;
		signed short   short_;
		signed int     int_;
		signed long    long_;