ГОСТ Р ИСО/ТС 10303-26—2015
lines(3:.set_unset_bitmap - 7;
lines(3;.id - 7;
inst_ref.instance_index - 3;
memcpy<4lines ;3].startp,4inst_ref,sizeof (ir.st_ref_t));
inst_ref.instance_index - 0;
memcpy<4lines-3].endp,4ir.st_ref,sizeof(inst_ref_t));
lines(3}.colour.select_bitmap - 1;
line_coiour - ’/void;
lines(3;.colour.e_colour - line_colour;
lines(3’.colour.s_colour - "Blue line";
/ /
// Create the group that shall cor.taing the Line dataset
/ /
objgroup - H5Gcreate(group_id, ”Line_objects", H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT>;
/ /
// Create the dataset that shall contain the Lines
/ /
line dataset - H5Dcreatel(obj_group, "Line_instar.ces", l_tid,
myspace, H5P_D£FAUL?);
/ /
// Write the Lines to the dataset
/ /
if(rstat - H5Dwrite(line_dataset, i_tid, H5S_ALL, H5S_ALL,
H5P_DEFAUL7, lines») goto err;
err:
return <rstat);
См. распечатку результирующего файла HDF5 в С.9.
С.8 Представление значений агрегированного типаданных языка EXPRESS в HDF5
Объект "Land_survey’ языка EXPRESS, определенный в контекстной схеме, содержит две вложенные агре
гированные структуры.
П
........................................................- ........................ - ...................................................................
// Define Land Survey:
/ /
// Exemplifies how references to aggregates are encoded encoded.
// One aggregate is stored on a separate dataset. The other one is embedded.
/ / .................- ...........- ...........— ......................- ...........- ...........- ...........- ...........- ...........- ...........
herr_t define_compound_land_survey(hid_t group_id, hidt *lls_tid)
{
herr_t rstat;
long mysize,offset;
long string_tid_size;
long aggr_ref_tid_size;
hid_t ls_tid;
hid_t string_tid;
hidt aggrl_ref_tib;
hid_t aggr2_ref_tid;
hidt vlen_of_vler._double_tid;
hidt vlen_of_vler._ref_tid;
‘i:s_tid - -1;
string_tid - HSTcopy<H5T_C_S1);
if(rstat - H5Tset_size(string_tid, H5T_VARIABLE)) goto err;
string_tid_size - HSTget_size(string_tid>;
vlen_of_vlen_ref_tid - define_nested_ref_aggr();
if(rstat *-def ine_aggr_reference(group_id, vler._of_vlen_ref_tid,
"l", 4aggrl_ref_tid)) goto err;
37