### Step 2: Implement your components

###

Writing CIDL files:

Distributor:

· In Quoter/Distributor sub-directory, place a cidl file Distributor.cidl that looks like this.

· The MPC files we generated earlier automatically invoked the CIDLC compiler to generate the Servants, Executors, and Contexts for us. To reduce the amount of work and typing we need to do, we will next instruct the CIDLC compiler to generate an empty Distributor Executor implementation (Object implementation in the figure above). In the Quoter/Distributor sub-directory, type the following:

cidlc -I$TAO_ROOT -I$TAO_ROOT/tao -I$CIAO_ROOT/ciao --gen-exec-impl -- Distributor.cidl

The above command will generate a Distributor_exec.h and Distributor_exec.cpp files. These generated files greatly reduced the amount of work we do. We’ll edit those files later in the tutorial to insert our business logic in the Distributor component.

Broker:

· In Quoter/Broker sub-directory, place a cidl file Broker.cidl that looks like this.

· The MPC files we generated earlier automatically invoked the CIDLC compiler to generate the Servants, Executors, and Contexts for us. To reduce the amount of work and typing we need to do, we will next instruct the CIDLC compiler to generate an empty Distributor Executor implementation (Object implementation in the figure above). In the Quoter/Broker sub-directory, type the following:

cidlc -I$TAO_ROOT -I$TAO_ROOT/tao -I$CIAO_ROOT/ciao --gen-exec-impl -- Broker.cidl

The above command will generate a Broker_exec.h and Broker_exec.cpp files. These generated files greatly reduced the amount of work we do. We’ll edit those files later in the tutorial to insert our business logic in the Broker component.

Note:

To understand the meaning of different parameters passed to the CIDLC compiler click here or type the following command:

cidlc --h

Implement the Components:

Distributor:

· The CIDLC compiler generated an empty Distributor_exec.h and Distributor_exec.cpp files for us. You should now add your business logic to the executors. Look into Distributor_exec.h and Distributor_exec.cpp to see how we implemented this.

Broker:

· The CIDLC compiler generated an empty Distributor_exec.h and Distributor_exec.cpp files for us. You should now add your business logic to the executors. Look into Broker_exec.h and Broker_exec.cpp to see how we implemented this.

Previous Next