comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Is there a way to use C++ code in IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Is there a way to use C++ code in IDL [message #34197 is a reply to message #34196] Thu, 20 February 2003 11:17 Go to previous messageGo to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
"CelticBlues" wrote in

> It's a fairly complex ascii file, the parser of which I did not write
> myself. Combine the complexity, with the fact that I didn't write the
> original parser, and I feel more comfortable reusing the code, than
> rewriting it in IDL, which I just started using yesterday. Maybe as I
learn
> more about IDL, I'll write a parser in IDL, but until then....

Everyone seems to be chiming in with their opinions and they are all valid.

Determining where to spend your effort is difficult, especially if you don't
have much experience with IDL and you don't have intimate knowledge of the
file format. You can really help your cause if you post a snippet of your
file since some of the experienced IDL'ers can give you their opinion on the
level of effort needed to parse a record in IDL.


If you decide to go the C++ route I would suggest coding a wrapper function
in C++ to interface your code to IDL as an dynamically loadable module (aka
dlm). I know you don't have much experience with IDL. I am hoping you have
some with C/C++? As a novice C/C++ coder I have written a number of simple
.dlms. If you have experience with C/C++ you should be well on your way.

How simple is it to use the C++ code? Do you just pass the function a file
name and it returns a struct or do you pass it a record as a char array and
it returns the parsed record in a struct? The simpler to use, the simpler
to code into a dlm.

Also, if you go the dlm route I strongly suggest picking up a copy of Ronn
Kling's book "Calling C from IDL" available from his website
www.kilvarock.com.

I could probably work up an example of a dlm which returns a structure to
IDL if you are interested.

-Rick
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: howto bind shortcut key to button
Next Topic: Check if coordinate is in array

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 16:11:49 PDT 2025

Total time taken to generate the page: 1.12268 seconds