Archived
This forum has been archived. Please start a new discussion on GitHub.
What kind of pointer can be used in slice definitions ?
in Help Center
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!
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); } };
0
Comments
-
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:interface TTT { void op(); }; interface Test { TTT getTestValue(); TTT* getTestProxy(); };
Hope that helps,
- Mark0