From: Michele J. <er...@jl...> - 2007-03-19 14:21:20
|
Jake Colman wrote: >We've been using SWIG for quite some time to create Tcl bindings from C++ >code. We recently wrote a method that returns a std::pair<x,y>. SWIG seems >to understand it and creates a Tcl binding for it. When I invoke the method, >Tcl does seem to execute it. > >My question is how do I access that std::pair? I realize that this is more >of a Tcl than a SWIG question but I'm hoping that someone here can help me. > >Please look at the following sequence: > >% set valref [pValuable_fetch "BRDPA_NEW"] >_004627b8_p_pValuable >% set bondOptref [pValuable_castTopBondOption $valref] >_004627b8_p_pBondOption >% pBondOption BondOptObj -this $bondOptref >_00466b10_p_pDate >% BondOptObj breakageFee MYDATE 0 >_0040b2a0_p_std__pairTdouble_cDate_t >% set bf [BondOptObj breakageFee MYDATE 0] >_00443490_p_std__pairTdouble_cDate_t > >How can I access the result of the breakageFee method on the BondOptObj >object? > > > Have you included std_pair.i? Can you include a C++ example? Maybe then, I can help. Michele |