ObjFW  Diff

Differences From Artifact [ba305281bd]:

To Artifact [a9d8cfa7c2]:


31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65

66
67

68
69

70
71

72

73
74
75

76
77

78
79

80
81

82
83

84

85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/*! @file */

/*!
 * @brief The C type of a number stored in an OFNumber.
 */
typedef enum {
	/*! bool */
	OF_NUMBER_BOOL		= 0x01,
	/*! unsigned char */
	OF_NUMBER_UCHAR		= 0x02,
	/*! unsigned short */
	OF_NUMBER_USHORT	= 0x03,
	/*! unsigned int */
	OF_NUMBER_UINT		= 0x04,
	/*! unsigned long */
	OF_NUMBER_ULONG		= 0x05,
	/*! unsigned long long */
	OF_NUMBER_ULONGLONG	= 0x06,
	/*! size_t */
	OF_NUMBER_SIZE		= 0x07,
	/*! uint8_t */
	OF_NUMBER_UINT8		= 0x08,
	/*! uint16_t */
	OF_NUMBER_UINT16	= 0x09,
	/*! uint32_t */
	OF_NUMBER_UINT32	= 0x0A,
	/*! uint64_t */
	OF_NUMBER_UINT64	= 0x0B,
	/*! uintptr_t */
	OF_NUMBER_UINTPTR	= 0x0C,
	/*! uintmax_t */
	OF_NUMBER_UINTMAX	= 0x0D,
	OF_NUMBER_SIGNED	= 0x10,
	/*! signed char */
	OF_NUMBER_CHAR		= OF_NUMBER_UCHAR | OF_NUMBER_SIGNED,

	/*! signed short */
	OF_NUMBER_SHORT		= OF_NUMBER_USHORT | OF_NUMBER_SIGNED,

	/*! signed int */
	OF_NUMBER_INT		= OF_NUMBER_UINT | OF_NUMBER_SIGNED,

	/*! signed long */
	OF_NUMBER_LONG		= OF_NUMBER_ULONG | OF_NUMBER_SIGNED,

	/*! signed long long */

	OF_NUMBER_LONGLONG	= OF_NUMBER_ULONGLONG | OF_NUMBER_SIGNED,
	/*! int8_t */
	OF_NUMBER_INT8		= OF_NUMBER_UINT8 | OF_NUMBER_SIGNED,

	/*! int16_t */
	OF_NUMBER_INT16		= OF_NUMBER_UINT16 | OF_NUMBER_SIGNED,

	/*! int32_t */
	OF_NUMBER_INT32		= OF_NUMBER_UINT32 | OF_NUMBER_SIGNED,

	/*! int64_t */
	OF_NUMBER_INT64		= OF_NUMBER_UINT64 | OF_NUMBER_SIGNED,

	/*! ssize_t */
	OF_NUMBER_SSIZE		= OF_NUMBER_SIZE | OF_NUMBER_SIGNED,

	/*! intmax_t */

	OF_NUMBER_INTMAX	= OF_NUMBER_UINTMAX | OF_NUMBER_SIGNED,
	/*! ptrdiff_t */
	OF_NUMBER_PTRDIFF	= 0x0E | OF_NUMBER_SIGNED,
	/*! intptr_t */
	OF_NUMBER_INTPTR	= 0x0F | OF_NUMBER_SIGNED,
	/*! float */
	OF_NUMBER_FLOAT		= 0x20,
	/*! double */
	OF_NUMBER_DOUBLE	= 0x40 | OF_NUMBER_FLOAT,
} of_number_type_t;

/*!
 * @class OFNumber OFNumber.h ObjFW/OFNumber.h
 *
 * @brief Provides a way to store a number in an object.
 */







|

|

|

|

|

|

|

|

|

|

|

|

|
|

|
>

|
>

|
>

|
>

>
|

|
>

|
>

|
>

|
>

|
>

>
|

|

|

|

|







31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/*! @file */

/*!
 * @brief The C type of a number stored in an OFNumber.
 */
typedef enum {
	/*! bool */
	OF_NUMBER_TYPE_BOOL		= 0x01,
	/*! unsigned char */
	OF_NUMBER_TYPE_UCHAR		= 0x02,
	/*! unsigned short */
	OF_NUMBER_TYPE_USHORT		= 0x03,
	/*! unsigned int */
	OF_NUMBER_TYPE_UINT		= 0x04,
	/*! unsigned long */
	OF_NUMBER_TYPE_ULONG		= 0x05,
	/*! unsigned long long */
	OF_NUMBER_TYPE_ULONGLONG	= 0x06,
	/*! size_t */
	OF_NUMBER_TYPE_SIZE		= 0x07,
	/*! uint8_t */
	OF_NUMBER_TYPE_UINT8		= 0x08,
	/*! uint16_t */
	OF_NUMBER_TYPE_UINT16		= 0x09,
	/*! uint32_t */
	OF_NUMBER_TYPE_UINT32		= 0x0A,
	/*! uint64_t */
	OF_NUMBER_TYPE_UINT64		= 0x0B,
	/*! uintptr_t */
	OF_NUMBER_TYPE_UINTPTR		= 0x0C,
	/*! uintmax_t */
	OF_NUMBER_TYPE_UINTMAX		= 0x0D,
	OF_NUMBER_TYPE_SIGNED		= 0x10,
	/*! signed char */
	OF_NUMBER_TYPE_CHAR		= OF_NUMBER_TYPE_UCHAR |
					      OF_NUMBER_TYPE_SIGNED,
	/*! signed short */
	OF_NUMBER_TYPE_SHORT		= OF_NUMBER_TYPE_USHORT |
					      OF_NUMBER_TYPE_SIGNED,
	/*! signed int */
	OF_NUMBER_TYPE_INT		= OF_NUMBER_TYPE_UINT |
					      OF_NUMBER_TYPE_SIGNED,
	/*! signed long */
	OF_NUMBER_TYPE_LONG		= OF_NUMBER_TYPE_ULONG |
					      OF_NUMBER_TYPE_SIGNED,
	/*! signed long long */
	OF_NUMBER_TYPE_LONGLONG		= OF_NUMBER_TYPE_ULONGLONG |
					      OF_NUMBER_TYPE_SIGNED,
	/*! int8_t */
	OF_NUMBER_TYPE_INT8		= OF_NUMBER_TYPE_UINT8 |
					      OF_NUMBER_TYPE_SIGNED,
	/*! int16_t */
	OF_NUMBER_TYPE_INT16		= OF_NUMBER_TYPE_UINT16 |
					      OF_NUMBER_TYPE_SIGNED,
	/*! int32_t */
	OF_NUMBER_TYPE_INT32		= OF_NUMBER_TYPE_UINT32 |
					      OF_NUMBER_TYPE_SIGNED,
	/*! int64_t */
	OF_NUMBER_TYPE_INT64		= OF_NUMBER_TYPE_UINT64 |
					      OF_NUMBER_TYPE_SIGNED,
	/*! ssize_t */
	OF_NUMBER_TYPE_SSIZE		= OF_NUMBER_TYPE_SIZE |
					      OF_NUMBER_TYPE_SIGNED,
	/*! intmax_t */
	OF_NUMBER_TYPE_INTMAX		= OF_NUMBER_TYPE_UINTMAX |
					      OF_NUMBER_TYPE_SIGNED,
	/*! ptrdiff_t */
	OF_NUMBER_TYPE_PTRDIFF		= 0x0E | OF_NUMBER_TYPE_SIGNED,
	/*! intptr_t */
	OF_NUMBER_TYPE_INTPTR		= 0x0F | OF_NUMBER_TYPE_SIGNED,
	/*! float */
	OF_NUMBER_TYPE_FLOAT		= 0x20,
	/*! double */
	OF_NUMBER_TYPE_DOUBLE		= 0x40 | OF_NUMBER_TYPE_FLOAT,
} of_number_type_t;

/*!
 * @class OFNumber OFNumber.h ObjFW/OFNumber.h
 *
 * @brief Provides a way to store a number in an object.
 */