Esempio n. 1
0
 // 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
 }
Esempio n. 2
0
 public NcVar(NcGroup grp, Int32 varId) {
     nullObject = false;
     myId = varId;
     groupId = grp.GetId();
 }
Esempio n. 3
0
 // Constructor for a non-global type
 public NcType(NcGroup grp, int id) {
     nullObject = false;
     myId = id;
     groupId = grp.GetId();
 }
Esempio n. 4
0
 public NcDim(NcGroup grp, Int32 dimId) {
     nullObject = false;
     groupId = grp.GetId();
     myId = dimId;
 }
Esempio n. 5
0
 // Constructor
 public NcType(NcGroup grp, string name) {
     nullObject = false;
     groupId = grp.GetId();
     NcType typeTmp = grp.GetType(name, Location.ParentsAndCurrent);
     myId = typeTmp.GetId();
 }