Public access

For example, the followingaccessor is generated for an attribute with public access:

int Furnace_getHeatReqs(const Furnace* const me);

The heatReqs attribute belongs to the Furnace object in the home heating system sample. The prototype for the public accessor is generated in the specification file for the Furnace. The name of the public operation includes the name of the object that is its target, in this case Furnace.

The body of the public accessor is generated in the implementation file for the Furnace:

int Furnace_getHeatReqs(const Furnace* const me) {
    return me->heatReqs;
}

Feedback