gobj_read_real_attr()

gobj_read_real_attr()#

Retrieves the value of a real (floating-point) attribute from the given hgobj. The function searches for the attribute in the object’s hierarchy, including inherited attributes from bottom objects.

Prototype

double gobj_read_real_attr(
    hgobj gobj,
    const char *name
);

Parameters

Key

Type

Description

gobj

hgobj

The hgobj instance from which the attribute value is retrieved.

name

const char *

The name of the attribute to retrieve.


Return Value

Returns the floating-point value of the specified attribute. If the attribute is not found, logs a warning and returns 0.

Notes

If the attribute is found and the hgobj has a mt_reading method, that method is called before returning the value.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples