ГОСТ Р ИСОГГС 10303-26—2015
Для определения и создания многомерных агрегированных структур, являющихся частями составного типа
данных "Land_survey\ используются вспомогательные функции. Эти функции вызываются из приведенной выше
функции "create_survey” и представлены ниже.
hid_t define_nested_real_aggr(void)
hid_t vlen_double_tid;
hid_c vlen_of_vlen_double_tid;
/ /
// Create variable-length datatype in two levels,
// double beeing the base type
/ /
vlen_double_tid - H5Tvlen_create(H5T_NATIVE_DOUBLE);
vlen_of_vlen_double_tid - H5Tvler._create
vlen_of_vlen_double_tid - H5Tvlen_create
(vlen_double_tid) ;
(vlen_of_vlen_double_tid);
return (vlen_of vlen_double_tid);
)
hid_t define_nested_ref_aggr(void)
i
hid_t vlen_ref_tid;
hid_t vlen_of_vlen_ref_tid;
/ /
// Create variable-length datatype in two levels, reference type
// beeir.g the base type
/ /
vlen_ref_tid - H5Tvlen_create(instance_reference_tid);
vlen_of_vlen_ref_tid - H5Tvlen_create (vlen_ref_tid) ;
return(vlen_of_vlen_ref_tid);
)
♦include <stdio.h>
♦include <3tdlib.h>
♦include <float.h>
♦include <string.h>
♦include
♦include
"hdf5.h"
"examples.h"
♦define LENO
♦define LEN1
3
2
/ /
// NOTE:
// Memory fragments
that are allocated in the following
// two functions are not released.
/ /
// In a real application a memory management system, where VLEN
// memory is grabbed from a pool of large геаизаЫе chunks
// should be developed.
// (The pool is released upon application exit)
/ /
// Did not take the time to develop a memory management system for
// this rather small example, so be aware of this small memory leak.
/ /
/ / .....................................................................................................................................................
// Create nested REAL aggregate
//
40