Definition of the Product¶
As the primary first step a COOM knowledge base is defined by starting the definition of a product hierarchy. A product hierarchy describes all elements of a product. A typical example is the component-based structure, for which the main components of a product are listed first, which in turn can contain sub-components.
We define the product hierarchy by using the product
keyword.
For example, a simple bike product can be described/configured by the elements color, withStand (yes/no), and front and rear wheels:
// Product definition of a simple bike.
product {
Color color
bool withStand
Wheel frontWheel
Wheel rearWheel
}
We see that the four elements are described by their types (Color, bool, and Wheel) and by their corresponding names color, withStand, frontWheel, and rearWheel.
Comments are introduced by double slashes (//
) for single lines and by /* ... */
for multiline comments.