Accessing type ID from slice?
Just wonder if one can access the type Id of a class or struct right in slice? The reason is to use type id as indexes in Freeze store. With this index, one can easily enumerate all instances of a given slice type in the store.
Take an example "food.ice":
module FoodStore
{
class Food
{
string name;
}
class BakedFood extends Food
{
int temperature;
int mintues;
}
class MyFaviouriteBread extends Food
{
}
}
Suppose there is a Freeze map created by:
slice2freeze --dict FoodStoreMap,string,FoodStore::Food FoodStoreMap food.ice
How can one add a Freeze Index to this map so that one can easily find all the instances of "BakedFood"? Seems there is no "ice_id" or "type_id" fields defined in Ice::Object ...
Thanks,
Peter
Last edited by peterlspot; 11-27-2007 at 05:13 AM.
Peter Lau
No pains, no gains.
Lifelong programming ...