forked from djw/core-plot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCPTNumericDataType.h
More file actions
44 lines (37 loc) · 1.3 KB
/
Copy pathCPTNumericDataType.h
File metadata and controls
44 lines (37 loc) · 1.3 KB
1
2
3
4
5
6
7
8
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
36
37
38
39
40
41
42
43
44
#import <Foundation/Foundation.h>
/// @file
/**
* @brief Enumeration of data formats for numeric data.
**/
typedef enum _CPTDataTypeFormat {
CPTUndefinedDataType = 0, ///< Undefined
CPTIntegerDataType, ///< Integer
CPTUnsignedIntegerDataType, ///< Unsigned integer
CPTFloatingPointDataType, ///< Floating point
CPTComplexFloatingPointDataType, ///< Complex floating point
CPTDecimalDataType ///< NSDecimal
}
CPTDataTypeFormat;
/**
* @brief Struct that describes the encoding of numeric data samples.
**/
typedef struct _CPTNumericDataType {
CPTDataTypeFormat dataTypeFormat; ///< Data type format
size_t sampleBytes; ///< Number of bytes in each sample
CFByteOrder byteOrder; ///< Byte order
}
CPTNumericDataType;
#if __cplusplus
extern "C" {
#endif
/// @name Data Type Utilities
/// @{
CPTNumericDataType CPTDataType(CPTDataTypeFormat format, size_t sampleBytes, CFByteOrder byteOrder);
CPTNumericDataType CPTDataTypeWithDataTypeString(NSString *dataTypeString);
NSString *CPTDataTypeStringFromDataType(CPTNumericDataType dataType);
BOOL CPTDataTypeIsSupported(CPTNumericDataType format);
BOOL CPTDataTypeEqualToDataType(CPTNumericDataType dataType1, CPTNumericDataType dataType2);
/// @}
#if __cplusplus
}
#endif