Each component used in the solution must be described in the CDL language, in a separate <component name>.cdl
file.
A CDL file includes the following sections:
component
is placed before the component name.<interface implementation name>:<package name>.<interface name in the package>
A component can contain several implementations of one interface. All implemented interfaces must be described in the IDL language, in IDL files.
CDL supports single-line comments and multi-line C++-style comments.
Example CDL files
At its simplest, the component contains a single interface implementation similar to the ping
component from the echo example.
ping.cdl
/* Component name: ping */
component ping
/* The component contains a named implementation of the IPing interface declared in the ping.idl file. Implementation name: ping_impl.*/
ping_impl: ping.IPing
In the following example, the CoFoo
component contains implementations of three interfaces declared in two different packages named Foo
and Baz
(i.e. in the Foo.idl
and Baz.idl
files).
CoFoo.cdl
/* Component name: CoFoo */
component CoFoo
/* The component contains an implementation of the IFoo interface declared in the Foo package. Implementation name: foo.*/
foo: Foo.IFoo
/* The component contains an implementation of the IBar interface declared in the Foo package. Implementation name: bar.*/
bar: Foo.IBar
/* The component contains three different implementations of the IBaz interface declared in the Baz package. Names of the implementations: baz1, baz2 and baz3.*/
baz1: Baz.IBaz
baz2: Baz.IBaz
baz3: Baz.IBaz
Page top