View Single Post
  #1 (permalink)  
Old 11-29-2007
blair blair is offline
Registered User
 
Name: Blair Zajac
Organization: Sony Pictures Imageworks
Project: VnP
 
Join Date: Mar 2007
Posts: 24
Adding ice_staticId() to Python servant classes

Just as Java classes have a static ice_staticId() method, it would be useful to have the Python class have similar ice_staticId() method. Here's the current methods on a Python servant class:

Code:
    interface Clock
{
    /*
     * Return the current time on the server as measured in the
     * number of microseconds since 00:00:00 January 1, 1970 UTC.
     *
     * @return a long containing the number of microseconds since
     *         00:00:00 January 1, 1970 UTC
     * @throws ::SpiIce::SpiIceException
     */
    idempotent long
    getCurrentTimeMicros()
        throws ::SpiIce::SpiIceException;
};
Code:
>>> dir(Clock)
['__class__', '__delattr__', '__dict__', '__doc__', '__getattribute__',
 '__hash__', '__init__', '__module__', '__new__', '__reduce__',
'__reduce_ex__', '__repr__', '__setattr__', '__str__', '__weakref__',
'_op_getCurrentTimeMicros', '_op_ice_id', '_op_ice_ids', '_op_ice_isA',
'_op_ice_ping', 'ice_id', 'ice_ids', 'ice_isA', 'ice_ping', 'ice_type']
All the ice_* methods are instance methods. It would be nice to be able to say Clock.ice_staticId().

Thanks,
Blair
Reply With Quote