logo       

complex output argument: msg#00140

programming.swig

Subject: complex output argument

Hi,

I'm very new to SWIG, so I apologize if this is a question that gets asked a
lot.

I need to wrap the following function for both Java and Tcl:

/*************************************************************
* @brief Execute a command line command and return the result
* as an XML object.
*
* @param pCommandLine Command line string to process.
* @param pAgentName Agent name to apply the command line to.
* @param pResponse The XML response will be returned within this object.
* The caller should allocate this and pass it in.
* @returns True if the command succeeds.
*************************************************************/
bool ExecuteCommandLineXML(char const* pCommandLine, char const* pAgentName,
AnalyzeXML* pResponse) ;

>From what I've read in the SWIG documentation, typemaps.i provides
>functionality which would allow me to use primitive types as output arguments.
> Unfortunately, in this case I have a complex object. I don't know anything
>about writing typemaps yet, and before I dove into that stuff I wanted to
>know, is this going to be easy, or is implementing this going to be very
>difficult? The code in question is still in the development phase, so I may
>be able to convince the others involved to change the function definition to
>make things easier, but being able to wrap this as-is would be ideal.

Thanks,
Bob

PS Any sort of code or pseudo code would be greatly appreciated!
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise