Core Plot (macOS)
Cocoa plotting framework for macOS, iOS, and tvOS
CPTNumericData(TypeConversion) Category Reference

Type conversion methods for CPTNumericData. More...

#import <CPTNumericData+TypeConversion.h>

Public Instance Methods

Type Conversion
(nonnull CPTNumericData *) - dataByConvertingToDataType:
 Copies the current numeric data and converts the data to a new data type. More...
 
(nonnull CPTNumericData *) - dataByConvertingToType:sampleBytes:byteOrder:
 Copies the current numeric data and converts the data to a new data type. More...
 
Data Conversion Utilities
(void) - convertData:dataType:toData:dataType:
 Copies a data buffer and converts the data to a new data type without changing the byte order. More...
 
(void) - swapByteOrderForData:sampleSize:
 Swaps the byte order for each sample stored in a data buffer. More...
 

Detailed Description

Type conversion methods for CPTNumericData.

Method Documentation

◆ convertData:dataType:toData:dataType:

- (void) convertData: (nonnull NSData *)  sourceData
dataType: (nonnull CPTNumericDataType *)  sourceDataType
toData: (nonnull NSMutableData *)  destData
dataType: (nonnull CPTNumericDataType *)  destDataType 

Copies a data buffer and converts the data to a new data type without changing the byte order.

The data is assumed to be in host byte order and no byte order conversion is performed.

Parameters
sourceDataThe source data buffer.
sourceDataTypeThe data type of the source.
destDataThe destination data buffer.
destDataTypeThe new data type.

Extends class CPTNumericData.

◆ dataByConvertingToDataType:

- (nonnull CPTNumericData *) dataByConvertingToDataType: (CPTNumericDataType newDataType

Copies the current numeric data and converts the data to a new data type.

Parameters
newDataTypeThe new data type.
Returns
A copy of the current numeric data converted to the new data type.

Extends class CPTNumericData.

◆ dataByConvertingToType:sampleBytes:byteOrder:

- (nonnull CPTNumericData *) dataByConvertingToType: (CPTDataTypeFormat newDataType
sampleBytes: (size_t)  newSampleBytes
byteOrder: (CFByteOrder newByteOrder 

Copies the current numeric data and converts the data to a new data type.

Parameters
newDataTypeThe new data type format.
newSampleBytesThe number of bytes used to store each sample.
newByteOrderThe new byte order.
Returns
A copy of the current numeric data converted to the new data type.

Extends class CPTNumericData.

◆ swapByteOrderForData:sampleSize:

- (void) swapByteOrderForData: (nonnull NSMutableData *)  sourceData
sampleSize: (size_t)  sampleSize 

Swaps the byte order for each sample stored in a data buffer.

Parameters
sourceDataThe data buffer.
sampleSizeThe number of bytes in each sample stored in sourceData.

Extends class CPTNumericData.


The documentation for this category was generated from the following files: