View Single Post
  #1 (permalink)  
Old 11-13-2005
surfer surfer is offline
Registered User
 
 
Join Date: Jun 2005
Location: Germany
Posts: 38
Red face Slice and array???

Hello,

I've a question about Slice:
How is it possible to define a transmit or return value of an array?
In the documentation I didn't found some examples by using an array.


example how I would like to use it at XXX.java:
Code:
public String[] getArray(Ice.Current current){
    	String [] array = new String[100];
	array[0] = "test1";
	array[1] = "test2";
	array[2] = "test3";
	................
    	
    	return array 
}


public int getArraySize(String[] array, Ice.Current current){
	int iSize = array.length; 
    	return iSize 
}
but how is the definition in Slice XXX.ice:
Code:
#ifndef XXX_ICE
#define XXX_ICE

// here the array definitions ?????????????????

module YYY
{
interface xxx
{
    nonmutating string String[] getArray();
    nonmutating int getArraySize(String[] array);
};
};
#endif
Has somebody an solution or example ?


Thanks a lot greetings surfer
__________________
Philipp Henkel Brunel University London MSc student.
MSc dissertation: Centralized controlling of distributed application servers. Used tools: FC3, W2k, XP, Apache2, PHP5 , ICE-PHP and ICE-Java.

Last edited by surfer : 11-13-2005 at 10:33 AM.
Reply With Quote