T
Tobias Grimm
Hi!
I have an application written in C++, that provides a plugin interface. What I
would like to do now, is to implement a plugin, that allows to execute a ruby
script, like this:
1) Application loads plugin.so
2) Application invokes plugin
3) Plugin creates object "interface" of class Interface
4) Plugin loads rubyscript.rb
5) rubyscript.rb uses interface object created in 3) to send messages to the plugin
I used SWIG to create a wrapper for the Interface class that the ruby script
should use. If I simply wanted to create an ruby extension, the wrapper should
just be compiled to a lib, that ruby can load with a require statement. But now
the wrapper is part of the plugin, which itself is loaded by the application.
How do I get the ruby script know about the Interface class and the interface
object to use?
Tobias
I have an application written in C++, that provides a plugin interface. What I
would like to do now, is to implement a plugin, that allows to execute a ruby
script, like this:
1) Application loads plugin.so
2) Application invokes plugin
3) Plugin creates object "interface" of class Interface
4) Plugin loads rubyscript.rb
5) rubyscript.rb uses interface object created in 3) to send messages to the plugin
I used SWIG to create a wrapper for the Interface class that the ruby script
should use. If I simply wanted to create an ruby extension, the wrapper should
just be compiled to a lib, that ruby can load with a require statement. But now
the wrapper is part of the plugin, which itself is loaded by the application.
How do I get the ruby script know about the Interface class and the interface
object to use?
Tobias