|
|
|
|||||
|
Type id
Hi,
it could be nice to have a way to get the type id of a slice element instead of hard-coding the string constant in the source (something like CORBA XXHelper.id()). Regards, Guido |
|
|||||
|
Hi,
To Marc: the reason is simply avoiding hard-coding the strings, so that in case of module renaming you have only to recompile instead of search&replace (keys in Map, for example). To Michi: Oops, yes (obviously) you are right ! Well, something similar would be nice also for interface. Some static constant in XX.java, for example. Regards, Guido. |
|
||||||
|
Quote:
What I don't understand is why you care about the type ID though. Normally, there is little use for the type ID in application code. (The type ID exists mainly to support the Ice run time.) So, why do you need it? Cheers, Michi. |
|
|||||
|
Quote:
well, in the past (when there were no valuetypes) I made extensive use of XXHelper.id() to map copnverter to marshal/unmarshal ( ) CORBA struct to/from internal, CORBA-unaware, object (one for all, java.util.Date). Anyway, I think you are right, there should be no need for that. A useful case is in Communicator.addObjectFactory(), but, as you pointed out, classes have ice_staticId() .... Sorry for the waste of time, I'll try to be more careful in the future. Regards, Guido. |
![]() |
| 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 |
| Java: going from String to Enum Type | nightnday | Help Center | 2 | 03-21-2006 02:32 PM |
| How to define a variant type? | fengxb | Help Center | 2 | 07-31-2005 10:45 AM |
| Can I use Ice's smart pointer with my own type? | timeguest | Help Center | 1 | 06-27-2005 04:17 AM |
| Dynamic type knowledge | kovacm | Help Center | 2 | 01-28-2005 12:43 PM |
| ICE don't take wchar_t as original C++ type | _orchid_ | Bug Reports | 1 | 12-01-2003 01:28 PM |