00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "H5Ipublic.h"
00016 #include "h5Attribute.h"
00017 #include "h5Dataset.h"
00018 #include "h5File.h"
00019 #include "h5Group.h"
00020 #include <assert.h>
00021 #include <string.h>
00022 #include <stdio.h>
00023
00024
00025
00026
00027
00028 void H5Attribute_ctor(H5Attribute* a)
00029 {
00030 assert(a);
00031 memset(a, 0, sizeof(H5Attribute));
00032 H5Datatype_ctor(&(a->type));
00033
00034
00035 }
00036
00037 void H5Dataset_ctor(H5Dataset* d)
00038 {
00039 assert(d);
00040
00041 memset(d, 0, sizeof(H5Dataset));
00042 H5Datatype_ctor(&(d->type));
00043
00044
00045 }
00046
00047 void H5File_ctor(H5File* f)
00048 {
00049 assert(f);
00050
00051 memset(f, 0, sizeof(H5File));
00052
00053
00054 }
00055
00056 void H5Group_ctor(H5Group* g)
00057 {
00058 assert(g);
00059
00060 memset(g, 0, sizeof(H5Group));
00061
00062
00063 }
00064
00065 void H5Datatype_ctor(H5Datatype* t)
00066 {
00067 assert(t);
00068
00069 memset(t, 0, sizeof(H5Datatype));
00070
00071
00072 }
00073
00074 int get_machine_endian(void)
00075 {
00076 int order = H5DATATYPE_ORDER_LE;
00077 long one = 1;
00078
00079 if ( !(*((char *)(&one))) )
00080 order = H5DATATYPE_ORDER_BE;
00081
00082 return order;
00083 }
00084