H5_model.c 2.02 KB
Newer Older
gsell's avatar
gsell committed
1
/*
gsell's avatar
gsell committed
2
  Copyright (c) 2006-2015, The Regents of the University of California,
gsell's avatar
gsell committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
  through Lawrence Berkeley National Laboratory (subject to receipt of any
  required approvals from the U.S. Dept. of Energy) and the Paul Scherrer
  Institut (Switzerland).  All rights reserved.

  License: see file COPYING in top level of source distribution.
*/

#include "h5_private.h"

#include "h5core/h5.h"
#include "h5core/h5_debug.h"
#include "h5core/h5_model.h"

/* H5hut data model */

#define h5_hasstep F77_NAME(                  \
                h5_hasstep,                   \
                h5_hasstep_,                  \
                H5_HASSTEP)
int
h5_hasstep (
	const h5_int64_t* f,
	const h5_int64_t* stepno
	) {

	h5_file_t fh = h5_filehandlefor2c(f);
	H5_API_ENTER (
                int,
                "f=%p, stepno=%lld",
                (h5_file_p)fh, (long long int)stepno);
	H5_API_RETURN (h5_has_step (fh, *stepno));
}

#define h5_setstep F77_NAME(                    \
                h5_setstep,                     \
                h5_setstep_,                    \
                H5_SETSTEP)
h5_int64_t
h5_setstep (
	const h5_int64_t *f,
	h5_int64_t *step ) {

	h5_file_t fh = h5_filehandlefor2c(f);
	H5_API_ENTER (h5_int64_t, "f=%p, step=%lld", (h5_file_p)fh, (long long)*step);
	H5_API_RETURN (h5_set_step (fh, *step));
}

#define h5_getstep F77_NAME(                    \
                h5_getstep,                     \
                h5_getstep_,                    \
                H5_GETSTEP)
h5_int64_t
h5_getstep (
	const h5_int64_t *f
	) {

	h5_file_t fh = h5_filehandlefor2c(f);
	H5_API_ENTER (h5_int64_t, "f=%p", (h5_file_p)fh);
	H5_API_RETURN (h5_get_step (fh) + 1);
}

#define h5_getnsteps F77_NAME(                  \
                h5_getnsteps,                   \
                h5_getnsteps_,                  \
                H5_GETNSTEPS)
h5_int64_t
h5_getnsteps (
	const h5_int64_t *f
	) {

	h5_file_t fh = h5_filehandlefor2c(f);
	H5_API_ENTER (h5_int64_t, "f=%p", (h5_file_p)fh);
	H5_API_RETURN (h5_get_num_steps (fh));
}