Core Plot (iOS and tvOS)
Cocoa plotting framework for macOS, iOS, and tvOS
CPTNumericData.h
Go to the documentation of this file.
1 #import "CPTDefinitions.h"
2 #import "CPTNumericDataType.h"
3 
5 
8 @property (nonatomic, readonly, copy, nonnull) NSData *data;
9 @property (nonatomic, readonly, nonnull) const void *bytes;
10 @property (nonatomic, readonly) NSUInteger length;
12 
15 @property (nonatomic, readonly) CPTNumericDataType dataType;
16 @property (nonatomic, readonly) CPTDataTypeFormat dataTypeFormat;
17 @property (nonatomic, readonly) size_t sampleBytes;
18 @property (nonatomic, readonly) CFByteOrder byteOrder;
20 
23 @property (nonatomic, readonly, copy, nonnull) CPTNumberArray *shape;
24 @property (nonatomic, readonly) NSUInteger numberOfDimensions;
25 @property (nonatomic, readonly) NSUInteger numberOfSamples;
26 @property (nonatomic, readonly) CPTDataOrder dataOrder;
28 
31 +(nonnull instancetype)numericDataWithData:(nonnull NSData *)newData dataType:(CPTNumericDataType)newDataType shape:(nullable CPTNumberArray *)shapeArray;
32 +(nonnull instancetype)numericDataWithData:(nonnull NSData *)newData dataTypeString:(nonnull NSString *)newDataTypeString shape:(nullable CPTNumberArray *)shapeArray;
33 +(nonnull instancetype)numericDataWithArray:(nonnull CPTNumberArray *)newData dataType:(CPTNumericDataType)newDataType shape:(nullable CPTNumberArray *)shapeArray;
34 +(nonnull instancetype)numericDataWithArray:(nonnull CPTNumberArray *)newData dataTypeString:(nonnull NSString *)newDataTypeString shape:(nullable CPTNumberArray *)shapeArray;
35 
36 +(nonnull instancetype)numericDataWithData:(nonnull NSData *)newData dataType:(CPTNumericDataType)newDataType shape:(nullable CPTNumberArray *)shapeArray dataOrder:(CPTDataOrder)order;
37 +(nonnull instancetype)numericDataWithData:(nonnull NSData *)newData dataTypeString:(nonnull NSString *)newDataTypeString shape:(nullable CPTNumberArray *)shapeArray dataOrder:(CPTDataOrder)order;
38 +(nonnull instancetype)numericDataWithArray:(nonnull CPTNumberArray *)newData dataType:(CPTNumericDataType)newDataType shape:(nullable CPTNumberArray *)shapeArray dataOrder:(CPTDataOrder)order;
39 +(nonnull instancetype)numericDataWithArray:(nonnull CPTNumberArray *)newData dataTypeString:(nonnull NSString *)newDataTypeString shape:(nullable CPTNumberArray *)shapeArray dataOrder:(CPTDataOrder)order;
41 
44 -(nonnull instancetype)initWithData:(nonnull NSData *)newData dataType:(CPTNumericDataType)newDataType shape:(nullable CPTNumberArray *)shapeArray;
45 -(nonnull instancetype)initWithData:(nonnull NSData *)newData dataTypeString:(nonnull NSString *)newDataTypeString shape:(nullable CPTNumberArray *)shapeArray;
46 -(nonnull instancetype)initWithArray:(nonnull CPTNumberArray *)newData dataType:(CPTNumericDataType)newDataType shape:(nullable CPTNumberArray *)shapeArray;
47 -(nonnull instancetype)initWithArray:(nonnull CPTNumberArray *)newData dataTypeString:(nonnull NSString *)newDataTypeString shape:(nullable CPTNumberArray *)shapeArray;
48 
49 -(nonnull instancetype)initWithData:(nonnull NSData *)newData dataType:(CPTNumericDataType)newDataType shape:(nullable CPTNumberArray *)shapeArray dataOrder:(CPTDataOrder)order NS_DESIGNATED_INITIALIZER;
50 -(nonnull instancetype)initWithData:(nonnull NSData *)newData dataTypeString:(nonnull NSString *)newDataTypeString shape:(nullable CPTNumberArray *)shapeArray dataOrder:(CPTDataOrder)order;
51 -(nonnull instancetype)initWithArray:(nonnull CPTNumberArray *)newData dataType:(CPTNumericDataType)newDataType shape:(nullable CPTNumberArray *)shapeArray dataOrder:(CPTDataOrder)order;
52 -(nonnull instancetype)initWithArray:(nonnull CPTNumberArray *)newData dataTypeString:(nonnull NSString *)newDataTypeString shape:(nullable CPTNumberArray *)shapeArray dataOrder:(CPTDataOrder)order;
53 
54 -(nullable instancetype)initWithCoder:(nonnull NSCoder *)coder NS_DESIGNATED_INITIALIZER;
56 
59 -(NSUInteger)sampleIndex:(NSUInteger)idx, ...;
60 -(nullable const void *)samplePointer:(NSUInteger)sample NS_RETURNS_INNER_POINTER;
61 -(nullable const void *)samplePointerAtIndex:(NSUInteger)idx, ... NS_RETURNS_INNER_POINTER;
62 -(nullable NSNumber *)sampleValue:(NSUInteger)sample;
63 -(nullable NSNumber *)sampleValueAtIndex:(NSUInteger)idx, ...;
64 -(nonnull CPTNumberArray *)sampleArray;
66 
67 @end
CPTNumericData::bytes
const void * bytes
Returns a pointer to the data buffer’s contents.
Definition: CPTNumericData.h:9
CPTNumericDataType
Structure that describes the encoding of numeric data samples.
Definition: CPTNumericDataType.h:27
CPTDataTypeFormat
CPTDataTypeFormat
Enumeration of data formats for numeric data.
Definition: CPTNumericDataType.h:6
NSObject
-[CPTNumericData sampleArray]
nonnull CPTNumberArray * sampleArray()
Gets an array data samples from the receiver.
Definition: CPTNumericData.m:768
CPTNumericData::dataType
CPTNumericDataType dataType
The type of data stored in the data buffer.
Definition: CPTNumericData.h:15
CPTNumericData::sampleBytes
size_t sampleBytes
The number of bytes in a single sample of data.
Definition: CPTNumericData.h:17
CPTNumericDataType.h
NSUInteger
typedef NSUInteger
CPTNumericData::dataTypeFormat
CPTDataTypeFormat dataTypeFormat
The format of the data stored in the data buffer.
Definition: CPTNumericData.h:16
CFByteOrder
CPTNumericData::numberOfSamples
NSUInteger numberOfSamples
The number of samples of dataType stored in the data buffer.
Definition: CPTNumericData.h:25
-[NSObject copy]
id copy
CPTNumericData::length
NSUInteger length
Returns the number of bytes contained in the data buffer.
Definition: CPTNumericData.h:10
CPTNumericData::data
NSData * data
The data buffer.
Definition: CPTNumericData.h:8
CPTDefinitions.h
CPTNumericData
An annotated NSData type.
Definition: CPTNumericData.h:4
CPTDataOrder
CPTDataOrder
Enumeration of memory arrangements for multi-dimensional data arrays.
Definition: CPTNumericDataType.h:19
NSArray
NSString
CPTNumericData::dataOrder
CPTDataOrder dataOrder
The order that numbers are stored in a multi-dimensional data array.
Definition: CPTNumericData.h:26
CPTNumericData::byteOrder
CFByteOrder byteOrder
The byte order used to store each sample in the data buffer.
Definition: CPTNumericData.h:18
CPTNumericData::numberOfDimensions
NSUInteger numberOfDimensions
The number dimensions in the data buffer array.
Definition: CPTNumericData.h:24
NSSecureCoding-p
CPTNumericData::shape
CPTNumberArray * shape
The shape of the data buffer array.
Definition: CPTNumericData.h:23
NSCoder