// Constructor for an existing global attr public NcGroupAtt(NcGroup grp, int index) : base(false) { ASCIIEncoding encoder = new ASCIIEncoding(); groupId = grp.GetId(); varId = NC_GLOBAL; byte[] buffer = new byte[(int)NetCDF.netCDF_limits.NC_MAX_NAME]; NcCheck.Check(NetCDF.nc_inq_attname(groupId, varId, index, buffer)); string sbuffer = encoder.GetString(buffer); myName = sbuffer.Substring(0, sbuffer.IndexOf('\0')); // A null-terminated C-string }
public NcVar(NcGroup grp, Int32 varId) { nullObject = false; myId = varId; groupId = grp.GetId(); }
// Constructor for a non-global type public NcType(NcGroup grp, int id) { nullObject = false; myId = id; groupId = grp.GetId(); }
public NcDim(NcGroup grp, Int32 dimId) { nullObject = false; groupId = grp.GetId(); myId = dimId; }
// Constructor public NcType(NcGroup grp, string name) { nullObject = false; groupId = grp.GetId(); NcType typeTmp = grp.GetType(name, Location.ParentsAndCurrent); myId = typeTmp.GetId(); }