package com.njcn.product.advance.responsility.model;

import com.sun.jna.Structure;

import java.io.Serializable;
import java.util.Collections;
import java.util.List;

public class HKDataStruct extends Structure implements Serializable {
    public float hk[] = new float[QvvrStruct.MAX_P_NODE + 1];

    public HKDataStruct() {
    }

    @Override
    protected List getFieldOrder() {
        return Collections.singletonList("hk");
    }

    public HKDataStruct(double[] hk) {
        for (int i = 0; i < hk.length; i++) {
            this.hk[i] = (float) hk[i];
        }
    }

    public static class ByReference extends HKDataStruct implements Structure.ByReference {
        public ByReference(double[] p) {
            super(p);
        }
    }

    public static class ByValue extends HKDataStruct implements Structure.ByValue {
        public ByValue(double[] p) {
            super(p);
        }
    }
}
