|
|
|
|||||
|
ICE version 3.01
I use slice2java --stream to produce some java code from slice. But the code produced shows some problem with Ice.StringSeqHelper's read and write methods. the code call this methods with a InputStream or OutputStream parameter while StringSeqHelper class requires with BasicStream. what is the wrong?
__________________
QingQing Chen BeiJing Gaov Visual Tech Co., Ltd. Mysee.com Internal Administration Project |
|
|||||
|
Quote:
1. in modul management struct UUID { string idString; }; 2. in module SourceServer struct ResourceUrl { short resClass; management::UUID resId; }; struct Resource { ResourceUrl resUrl; int refCount; Ice::StringSeq components; }; --------------------------------------------------------------- slice2java command: slice2java --stream --output-dir src -I*** -I*** *** --------------------------------------------------------------- Ice version 3.01 --------------------------------------------------------------- JDK: java version "1.5.0_06" --------------------------------------------------------------- No slice2java runtime errors Java doesn't need to complie actually, there are serveral slice files with lots ice object. only with one Resource.java with this problem part of Resource.java code ... public void __write(Ice.OutputStream __outS) { resUrl.__write(__outS); __outS.writeInt(refCount); Ice.StringSeqHelper.write(__outS, components); //here the problem } public void __read(Ice.InputStream __inS) { resUrl = new ResourceUrl(); resUrl.__read(__inS); refCount = __inS.readInt(); components = Ice.StringSeqHelper.read(__inS); //here the problem }
__________________
QingQing Chen BeiJing Gaov Visual Tech Co., Ltd. Mysee.com Internal Administration Project |
|
||||||
|
The problem is that streaming support is not generated for the builtin sequence types so therefore the correct override is not present for the Ice::StringSeq. We will discuss this issue internally. However, in the meantime what you can do is add your own sequence<string> type ... something like:
Code:
sequence<string> MyStringSeq;
struct Resource
{
ResourceUrl resUrl;
int refCount;
MyStringSeq components;
};
|
|
|||||
|
hai,Chen.I am from Beijing too and I am learning Ice now.
My MSN is w_sea78@hotmail.com.We can exchange and share the knowledge about Ice. ![]()
__________________
Name:Hai Wang Eanglish name:Jason Company:North Microelectronics website:bj-nmc.cn Our project:an industrial package Project discriptions: |
![]() |
| 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 |
| Where is slice2java | dashie | Help Center | 7 | 09-04-2006 07:21 AM |
| run slice2java for WinXP | torrecam | Help Center | 1 | 02-21-2005 11:33 AM |
| slice2java command | anitha | Help Center | 3 | 10-14-2004 10:35 PM |
| Patch for slice2java, v1.5.1 | michi | Patches | 0 | 08-19-2004 06:53 PM |
| slice2java | alexander | Bug Reports | 6 | 12-16-2003 02:15 PM |