Components-based development in C

You enable component-based developed in IBM® Rational® Rhapsody® Developer for C by introducing code generation support for interfaces and ports.

A class might realize an interface, that is, provide an implementation for the set of services it specifies (that is, operations and event receptions). As in IBM Rational Rhapsody Developer for C++ and IBM Rational Rhapsody Developer for Java, you use a realization relationship to indicate that a class is realizing an interface. In addition, an interface might inherit another interface, meaning that it augments the set of interfaces the superinterface specifies. You can specify interfaces, realize them, and connect to objects through the interfaces.

C users can take advantage of service ports that allows the passing of operations and functions through ports, in addition to passing events. Just like in C++, you can specify ports with provided and required interfaces. In addition, version 7.1 of the product provides code generation support for standard UML ports in C and code generation of ports supports the initialization of links through ports. For more information about ports, see Managing ports.

In this type of development in C, interfaces are treated as a specification of services (that is, operations) and not as inheritance of data (attributes). Also, in this type of development in C, realization (as opposed to inheritance) is used to distinguish between realizing an interface and inheriting an interface/class.

As of version 7.1 of the product, code generation supports realizing interfaces in C. This means interfaces and ports specified in a C model will be implemented by the code generator. This means code generation generates:


Feedback