summaryrefslogtreecommitdiffstats
path: root/doxygen/examples/H5LT_examples.c
blob: 5ed4c29914d2320df949bbdbf779f5d34d3b8641 (plain)
1
2
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
/* -*- c-file-style: "stroustrup" -*- */

//! <!-- [get_attribute_info] -->

H5T_class_t type_class;
size_t      type_size;
hsize_t     dims[0];
... status = H5LTget_attribute_info(file_id, "/", STRNAME, dims, &type_class, &type_size);
if (type_class == H5T_STRING) {
    printf("Attribute is a string.\n");
    printf("String size: %i\n", type_size);

    //! <!-- [get_attribute_info] -->

    //! <!-- [enum] -->

    “H5T_ENUM
    {
        H5T_NATIVE_INT;
        “Bob” 0;
        “Elena” 1;
        “Quincey” 2;
        “Frank” 3;
    }//! <!-- [enum] -->