[MOAB-dev] r5518 - MOAB/trunk/src/io
tautges at mcs.anl.gov
tautges at mcs.anl.gov
Sat May 12 14:15:57 CDT 2012
Author: tautges
Date: 2012-05-12 14:15:57 -0500 (Sat, 12 May 2012)
New Revision: 5518
Added:
MOAB/trunk/src/io/ReadDamsel.cpp
MOAB/trunk/src/io/ReadDamsel.hpp
Modified:
MOAB/trunk/src/io/WriteDamsel.cpp
Log:
Backing up a start at a Damsel reader; using define_entity_fast instead
of define_entity in writer.
Added: MOAB/trunk/src/io/ReadDamsel.cpp
===================================================================
--- MOAB/trunk/src/io/ReadDamsel.cpp (rev 0)
+++ MOAB/trunk/src/io/ReadDamsel.cpp 2012-05-12 19:15:57 UTC (rev 5518)
@@ -0,0 +1,241 @@
+#include "ReadDamsel.hpp"
+
+#include "assert.h"
+#include "moab/Interface.hpp"
+#include "moab/Core.hpp"
+#include "moab/Range.hpp"
+#include "moab/Error.hpp"
+#include "moab/ReadUtilIface.hpp"
+#include "MBTagConventions.hpp"
+#include "EntitySequence.hpp"
+#include "Internals.hpp"
+#include "DenseTag.hpp"
+
+namespace moab {
+
+ // Some macros to handle error checking (cribbed from WriteHDF5). The
+ // CHK_MB_ERR_* check the value of an ErrorCode.
+ // The *_0 macros accept no other arguments. The *_1
+ // macros accept a single damsel handle to close on error.
+ // All macros contain a "return" statement. These macros are coded with a do if while
+ // to allow statements calling them to be terminated with a ;
+#define CHK_MB_ERR( A, B ) \
+do if (MB_SUCCESS != (A)) { \
+mError->set_last_error(B);\
+return error(A);} while(false)
+
+#define CHK_MB_ERR_2( A, B, C ) \
+do if (MB_SUCCESS != (A )) { \
+mError->set_last_error(B, C); \
+return error(A);} while(false)
+
+#define CHK_MB_ERR_FINALIZE( A, B ) \
+do if (MB_SUCCESS != (A)) { \
+ DMSLlib_finalize(dmslLib); \
+ dmslLib = 0; \
+ mError->set_last_error(B);\
+ return error(A); \
+} while(false)
+
+#define CHK_DMSL_ERR( A, B ) \
+do if (DMSL_OK.id != A.id) { \
+mError->set_last_error(B);\
+return error(MB_FAILURE); \
+} while(false)
+
+#define CHK_DMSL_ERR_2( A, B, C ) \
More information about the moab-dev
mailing list