pointerPointerScalarArray<T, R extends RType> method

StructPointerArrayField<T, RPointer<R>> pointerPointerScalarArray<T, R extends RType>(
  1. F f
)

Creates a pointer-to-pointer scalar array field for f.

The field represents a C-style T**: an outer pointer points to pointers, and each inner pointer points to a scalar value.

Implementation

StructPointerArrayField<T, RPointer<R>> pointerPointerScalarArray<
  T,
  R extends RType
>(F f) {
  _checkField(f);
  final type = _getFieldAs<RPointer<RPointer<R>>>(f);
  final scalarCodec = ScalarCodec<T, R>(type.target.target);
  final innerPointerCodec = PointerCodec(type.target, scalarCodec);
  final pointerCodec = PointerCodec(type, innerPointerCodec);
  return .new(offset(f), pointerCodec);
}