Results 1 to 2 of 2

Thread: What kind of pointer can be used in slice definitions ?

  1. #1
    rc_hz is offline Registered User
    Name: Eric RC
    Organization: www.genband.com
    Project: No project yet
    Join Date
    Jul 2004
    Location
    Hangzhou, China
    Posts
    189

    What kind of pointer can be used in slice definitions ?

    Suppose TTT is one type of basic Slice types, user-defined types, class or interface, then when can the following slice file be compiled and when can not ? Is there a general principle about pointer's usage ? I am sorry I can not find any restrictions about this in Ice's documentation. Thank you!
    Code:
    module Demo
    {		
    	struct STest
    	{
    	    TTT		*t;
    	};
    	
    	sequence<TTT*> TTTSeq;
    	
    	dictionary<int, TTT*> TTTDic;
    	
    	class CTest
    	{
    		TTT		*t;
    	}	
    
    	interface ITest
    	{
    		TTT* getFileCompressed(TTT* t1, out TTT *t2);
    	}		
    };
    Eric RC
    www.genband.com (telecommunication)
    I like ICE (Ice for C++/Java/Python)

  2. #2
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,441
    Hi,

    TTT can only be a class or an interface. The TTT* syntax denotes a proxy for the type TTT, not a pointer like in C++. For example:

    Code:
    interface TTT
    {
        void op();
    };
    
    interface Test
    {
        TTT getTestValue();
        TTT* getTestProxy();
    };
    Hope that helps,
    - Mark

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to define a pointer type in slice?
    By acku711 in forum Help Center
    Replies: 3
    Last Post: 12-15-2008, 09:54 AM
  2. Replies: 2
    Last Post: 03-03-2008, 11:10 PM
  3. Replies: 10
    Last Post: 03-20-2006, 10:59 PM
  4. Pointer problems
    By Nis Baggesen in forum Help Center
    Replies: 2
    Last Post: 06-06-2005, 03:44 AM
  5. About the smart pointer.
    By level in forum Help Center
    Replies: 11
    Last Post: 08-04-2004, 08:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •