[omniORB] [beginner] pass typedef argument in python
Duncan Grisby
duncan at grisby.org
Fri Nov 11 12:12:17 GMT 2011
On Mon, 2011-11-07 at 08:39 +0200, Aryeh Leib Taurog wrote:
> module Baseball {
> typedef sequence<string<12>, 1000> PlayersGroup;
> interface PlayerStatsManager {
> any GetStatsForGroup(in any group);
> };
> };
>
> The java code looks something like this:
>
> org.omg.CORBA.Any getStats(String[] players) {
> org.omg.CORBA.Any playerList = _orb.create_any();
> PlayersGroupHelper.insert(playerList, players);
> return _statsMgr.GetStatsForGroup(playersList);
> }
>
> How would I do this with omniORB in python?
players = ["one", "two", "three"]
playersList = CORBA.Any(Baseball._tc_PlayersGroup, players)
statsMgr.GetStatsForGroup(playersList)
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list