|
|
|
|||||
|
Dynamic dispatch demo
Hi.
I have a question regarding how to implement dynamic dispatch. I"m following the demo given in $ICE_HOME/demo/Ice/invoke/ I've taken out all the functions except one.. Here is my sample Dynamic.ice file module Dynamic { struct Structure { string name; int value; }; sequence<Structure> StructureSeq; interface Printer { void printStructSequence(StructureSeq seq); }; }; I've also taken PrinterI.h and PrinterI.cpp and stripped it out for only my function printStructSequence (implemented ice_invoke()) now, in the demo, i've noticed two methods ice_writeStructureSeq and ice_readStructureSeq do I have to implement this in Dynamic.cpp, or will slice2cpp do it for me.. I'm using slice2cpp like this slice2cpp --stream Dynamic.ice Right now, when compiling, I get the error pradab@dagger:~/work/dynamic$./dynamic.bash PrinterI.cpp: In member function `virtual bool PrinterI::ice_invoke(const std::vector<Byte, std::allocator<Byte> >&, std::vector<Byte, std::allocator<Byte> >&, const Ice::Current&)': PrinterI.cpp:18: error: `ice_readStructureSeq' undeclared in namespace `Dynamic ' DynamicClient.cpp: In member function `virtual int DynamicClient::run(int, char**)': DynamicClient.cpp:51: error: `ice_writeStructureSeq' undeclared in namespace ` Dynamic' g++: PrinterI.o: No such file or directory g++: DynamicClient.o: No such file or directory thats cuz these two methods are not there in Dynamic.cpp (generated by slice2cpp) Please help
__________________
Abhay Pradhan Infosys Technologies Limited |
|
||||||
|
Hi,
The ice_write/ice_read functions are generated by slice2cpp when you use the --stream option. Just take a look in your generated files (Dynamic.cpp|h). Regarding your compile error, are you sure that Dynamic.h is being included by your code? Regards, Dwayne |
|
|||||
|
oopsss
am so sorry..
I was doing slice2cpp --stream on the command line.. but had completely forgotten about it on the Makefile!! ![]() apoligies and thanks for the prompt help!
__________________
Abhay Pradhan Infosys Technologies Limited |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| dynamic replicaGroup registration | Greenhippo | Help Center | 2 | 11-22-2006 05:18 AM |
| Dynamic Ice and Blobject (revisited) | KE5CRP | Help Center | 7 | 04-21-2005 01:25 AM |
| Dynamic Ice and Blobject (IceStorm) | KE5CRP | Help Center | 7 | 04-20-2005 02:20 PM |
| Dynamic type knowledge | kovacm | Help Center | 2 | 01-28-2005 01:43 PM |
| dynamic link error | diddek | Bug Reports | 2 | 02-18-2004 04:16 PM |