Generating the executor files:
Distributor:
· The MPC files we generated earlier automatically invoke the TAO IDL compiler to generate the servant and Component Implementation Framework (CIF) for us. To reduce the amount of work and typing we need to do, we will next instruct the TAO IDL compiler to generate an empty StockDistributor Executor implementation (Object implementation in the figure above). In the Quoter/Distributor sub-directory, type the following:
tao_idl -I%TAO_ROOT% -I%TAO_ROOT%/tao -I%CIAO_ROOT% -I%CIAO_ROOT%/ccm -I%CIAO_ROOT%/ciao -Gex StockDistributor.idl
The above command will generate a StockDistributor_exec.h and StockDistributor_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:
· The MPC files we generated earlier automatically invoked the TAO IDL compiler to generate the servants, and the CIF for us. To reduce the amount of work and typing we need to do, we will next instruct the TAO IDL compiler to generate an empty StockBroker Executor implementation (Object implementation in the figure above). In the Quoter/Broker sub-directory, type the following:
tao_idl -I%TAO_ROOT% -I%TAO_ROOT%/tao -I%CIAO_ROOT% -I%CIAO_ROOT%/ccm -I%CIAO_ROOT%/ciao -Gex StockBroker.idl
The above command will generate a StockBroker_exec.h and StockBroker_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 TAO IDL compiler, type the following command:
tao_idl -?
Implement the Components:
Distributor:
· The TAO IDL compiler generated an empty StockDistributor_exec.h and StockDistributor_exec.cpp files for us. You should now add your business logic to the executors. Look into StockDistributor_exec.h and StockDistributor_exec.cpp to see how we implemented this.
Broker:
· The TAO IDL compiler generated an empty StockBroker_exec.h and StockBroker_exec.cpp files for us. You should now add your business logic to the executors. Look into StockBroker_exec.h and StockBroker_exec.cpp to see how we implemented this.