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

Home » Public Forums » archive » Re: Importing data from C/C++ to IDL when type is only known at runtime
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: Importing data from C/C++ to IDL when type is only known at runtime [message #48532 is a reply to message #48522] Wed, 26 April 2006 05:43 Go to previous messageGo to previous message
Robbie is currently offline  Robbie
Messages: 165
Registered: February 2006
Senior Member
I'm sure that there are a myriad of ways to approach this problem, each
with varying degrees of pain and frustration.

Here's an another option to consider (unless it is what you are
attempting to explain in option 3).

You can allocate either:

(A) A structure with values as IDL pointers
struct = {MYSTRUCT, a: ptr_new(/ALLOCATE_HEAP), $
b: ptr_new()/ALLOCATE_HEAP, c: ptr_new(/ALLOCATE_HEAP)}
*struct.a = a
*struct.b = b
*struct.c = c

(B) An array of IDL pointers
array = ptrarr(3,/ALLOCATE_HEAP)
*array[0] = a
*array[1] = b
*array[2] = c

In this example you need to set the variables a, b and c from the C
side. You can then use IDL_ExecuteStr() to execute the above code to
build the IDL variable you want.

Hope this helps,

Robbie
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: map_set stereographic projection
Next Topic: IDL licensing question

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

Current Time: Sun Oct 12 09:42:02 PDT 2025

Total time taken to generate the page: 1.52205 seconds