[MOAB-dev] r4944 - MOAB/trunk/src/io
tautges at mcs.anl.gov
tautges at mcs.anl.gov
Fri Jun 3 15:23:07 CDT 2011
Author: tautges
Date: 2011-06-03 15:23:07 -0500 (Fri, 03 Jun 2011)
New Revision: 4944
Modified:
MOAB/trunk/src/io/ReadNC.cpp
Log:
Fixing my last commit, and removing some tag_create warnings.
Modified: MOAB/trunk/src/io/ReadNC.cpp
===================================================================
--- MOAB/trunk/src/io/ReadNC.cpp 2011-06-03 20:08:04 UTC (rev 4943)
+++ MOAB/trunk/src/io/ReadNC.cpp 2011-06-03 20:23:07 UTC (rev 4944)
@@ -1180,7 +1180,7 @@
Tag numDimsTag = 0;
tag_name = "__NUM_DIMS";
int numDims = dimNames.size();
- rval = mbImpl->tag_get_handle(tag_name.c_str(), 1, MB_TYPE_INTEGER, numDimsTag, MB_TAG_SPARSE|MB_TAG_CREATE, &numDims);
+ rval = mbImpl->tag_get_handle(tag_name.c_str(), 1, MB_TYPE_INTEGER, numDimsTag, MB_TAG_SPARSE|MB_TAG_CREAT, &numDims);
ERRORR(rval, "Trouble creating __NUM_DIMS tag.");
if (MB_SUCCESS == rval) dbgOut.tprintf(2, "Tag created for variable %s\n", tag_name.c_str());
@@ -1188,7 +1188,7 @@
Tag numVarsTag = 0;
tag_name = "__NUM_VARS";
int numVars = varInfo.size();
- rval = mbImpl->tag_get_handle(tag_name.c_str(), 1, MB_TYPE_INTEGER, numVarsTag, MB_TAG_SPARSE|MB_TAG_CREATE, &numVars);
+ rval = mbImpl->tag_get_handle(tag_name.c_str(), 1, MB_TYPE_INTEGER, numVarsTag, MB_TAG_SPARSE|MB_TAG_CREAT, &numVars);
ERRORR(rval, "Trouble creating __NUM_VARS tag.");
if (MB_SUCCESS == rval) dbgOut.tprintf(2, "Tag created for variable %s\n", tag_name.c_str());
@@ -1202,7 +1202,8 @@
dimnames.push_back('\0');
}
unsigned int dimnamesSz = dimnames.size();
- rval = mbImpl->tag_create_variable_length(tag_name.c_str(), MB_TAG_SPARSE, MB_TYPE_OPAQUE, dimNamesTag, dimnames.c_str(), dimnamesSz);
+ rval = mbImpl->tag_get_handle(tag_name.c_str(), dimnamesSz, MB_TYPE_OPAQUE, dimNamesTag, MB_TAG_CREAT|MB_TAG_SPARSE|MB_TAG_VARLEN,
+ dimnames.c_str());
ERRORR(rval, "Trouble creating __DIM_NAMES tag.");
if (MB_SUCCESS == rval) dbgOut.tprintf(2, "Tag created for variable %s\n", tag_name.c_str());
@@ -1216,7 +1217,8 @@
varnames.push_back('\0');
}
unsigned int varnamesSz = varnames.size();
- rval = mbImpl->tag_create_variable_length(tag_name.c_str(), MB_TAG_SPARSE, MB_TYPE_OPAQUE, varNamesTag, varnames.c_str(), varnamesSz);
+ rval = mbImpl->tag_get_handle(tag_name.c_str(), varnamesSz, MB_TYPE_OPAQUE, varNamesTag, MB_TAG_CREAT|MB_TAG_SPARSE|MB_TAG_VARLEN,
+ varnames.c_str());
ERRORR(rval, "Trouble creating __VAR_NAMES tag.");
if (MB_SUCCESS == rval) dbgOut.tprintf(2, "Tag created for variable %s\n", tag_name.c_str());
@@ -1259,7 +1261,7 @@
std::cerr << "Unrecognized data type for tag " << tag_name << std::endl;
rval = MB_FAILURE;
}
- rval = mbImpl->tag_create_variable_length(tag_name.c_str(), MB_TAG_SPARSE, data_type, tagh, val, val_len);
+ rval = mbImpl->tag_get_handle(tag_name.c_str(), val_len, data_type, tagh, MB_TAG_CREAT|MB_TAG_SPARSE|MB_TAG_VARLEN, val);
ERRORR(rval, "Trouble creating <dim_name> tag.");
if (MB_SUCCESS == rval) dbgOut.tprintf(2, "Tag created for variable %s\n", tag_name.c_str());
}
More information about the moab-dev
mailing list