views:

114

answers:

2

I have this big polymorphic object hierarchy, and I want to expose these objects to another language using primitive types. I'm thinking my base object will have a dictionary of properties (C++), and each sublcass down the hierarchy will add properties or modify properties, and then when i forward to the other language, i don't need any casts - i just send the type, and the property dictionary.

thoughts?

Update: I'm bridging C++ and ActionScript through a third party library, if relevant.

A: 

What are the two languages you are dealing with?

Back in the day, this was the kind of problem that CORBA claimed to solve.

Jared
A: 

I don't understand what a "property" is in C++; and I don't understand what method[s] would be implemented by your various classes, and invoked from the other language.

A pseudo-coded example of what you're thinking of might make that clearer.

Apart from CORBA, see also COM and Web Services (which are other standard ways to implement language-independent cross-process IPC).

ChrisW