MCPcopy Create free account
hub / github.com/GenericMappingTools/gmt / gmtapi_select_put_function

Function gmtapi_select_put_function

src/gmt_api.c:534–551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

532GMT_LOCAL void gmtapi_get_val_char (union GMT_UNIVECTOR *u, uint64_t row, double *val) { *val = u->sc1[row]; }
533
534GMT_LOCAL inline GMT_putfunction gmtapi_select_put_function (struct GMTAPI_CTRL *API, unsigned int type) {
535 switch (type) { /* Use type to select the correct put function with which to place a value in the union */
536 case GMT_DOUBLE: return (gmtapi_put_val_double); break;
537 case GMT_FLOAT: return (gmtapi_put_val_float); break;
538 case GMT_ULONG: return (gmtapi_put_val_ulong); break;
539 case GMT_LONG: return (gmtapi_put_val_long); break;
540 case GMT_UINT: return (gmtapi_put_val_uint); break;
541 case GMT_INT: return (gmtapi_put_val_int); break;
542 case GMT_USHORT: return (gmtapi_put_val_ushort); break;
543 case GMT_SHORT: return (gmtapi_put_val_short); break;
544 case GMT_UCHAR: return (gmtapi_put_val_uchar); break;
545 case GMT_CHAR: return (gmtapi_put_val_char); break;
546 default:
547 GMT_Report (API, GMT_MSG_ERROR, "Internal error in gmtapi_select_put_function: Passed bad type (%d), Will be unable to place binary data\n", type);
548 return NULL;
549 break;
550 }
551}
552
553GMT_LOCAL inline GMT_getfunction gmtapi_select_get_function (struct GMTAPI_CTRL *API, unsigned int type) {
554 switch (type) { /* Use type to select the correct get function with which to extract a value from the union */

Callers 13

gmtapi_export_datasetFunction · 0.85
gmtapi_export_gridFunction · 0.85
gmtapi_export_cubeFunction · 0.85
gmtapi_read_matrixFunction · 0.85
gmtapi_grid2matrixFunction · 0.85
gmtapi_read_vectorFunction · 0.85
gmtapi_end_io_matrixFunction · 0.85
gmtapi_put_record_initFunction · 0.85
gmtapi_dataset2matrixFunction · 0.85
gmtapi_dataset2vectorFunction · 0.85
gmtapi_matrix2vectorFunction · 0.85
gmtapi_vector2matrixFunction · 0.85

Calls 1

GMT_ReportFunction · 0.85

Tested by

no test coverage detected