The structure has both a C and a C++ representation. The only difference between the two is that the C structure represents the datatype as an integer and the C++ version represents the datatype as an enum. Since the C++ struct is inherited directly from the C version, the two interoperate seamlessly.
Datastructure Specification
C Datastructure | C++ Datastructure |
typedef struct AmrGrid { int level; int maxlevel; int maxtime; int timestep; int persistence; int rank; int dims[3]; double delta[3]; double origin[3]; int timerefinement; int nbytes; int dataveclen; int datatype; void *data; } AmrGrid; |
struct AmrGrid { // Members inherited from C AmrGrid int level; int maxlevel; int maxtime; int timestep; int persistence; int rank; int dims[3]; double delta[3]; double origin[3]; int timerefinement; int nbytes; int dataveclen; void *data; // Members specific to C++ AmrGrid IObase::DataType datatype; }; |