[gme-users] plug-in chain

Aditya Agrawal aagrawa at us.ibm.com
Thu Apr 21 11:09:42 CDT 2005


Dear Gabor,

I am sorry, I didn't notice that you are not working at ISIS. I don't know 
if I can directly send you the source code. If you want you can get the 
GReAT source code from the escher site http://escher.isis.vanderbilt.edu/. 


Otherwise you can do the following:

Create a RAW component using GME's component generator and then at the 
bottom of the InvokeEx function you need to write code which looks like 
this.

                                CComPtr<IMgaProject> spProject = project;
                                CComPtr<IMgaFCO> spContextFCO = 
currentobj;
                                CComPtr<IMgaFCOs> spSelectedFCOs = 
selectedobjs;
                                long lParam = param;

                                {       // Calling the GR interprerter
                                        CComBSTR bstrCompName( 
L"MGA.Interpreter.Generate GR" );

                                        CComPtr<IMgaComponentEx> 
grComponent;
                                        COMTHROW( 
grComponent.CoCreateInstance( bstrCompName ) ) ;
                                        COMTHROW( 
grComponent->put_InteractiveMode( VARIANT_TRUE ) );
                                        COMTHROW( grComponent->Enable( 
VARIANT_TRUE ) );
                                        COMTHROW( grComponent->Initialize( 
spProject ) );
                                        STDMETHODIMP ret = 
grComponent->InvokeEx( spProject, spContextFCO, spSelectedFCOs, lParam ) ;
                                        if(ret != S_OK)
                                                return ret;
 
                                }

You can cascade interpreters, have then be invoked conditionally and all 
the good stuff.

If I remember correctly I had once assembled a command line tool that 
could be provided with a gme file and an interpreter name. This tool would 
then invoke the interpreter on the file.

Attila, could you please tell us weather this tool survived or has it been 
buried?


Thanks,
Adi
 

-----------------------------------
Aditya Agrawal
Researcher
IBM T. J. Watson
mailto:aagrawa at us.ibm.com
+1 (914) 784-6068 (TL 863)


gme-users-bounces at list.isis.vanderbilt.edu wrote on 04/20/2005 02:54:43 
AM:

> It would be fine if someone can send me the source code or a link 
> where I can access it.
> 
> Thanks,
> 
> Gabor Batori
> -----Original Message-----
> From: gme-users-bounces at list.isis.vanderbilt.edu [mailto:gme-users-
> bounces at list.isis.vanderbilt.edu]
> Sent: 20 April 2005 03:40
> To: A list for GME users to share thoughts and discuss bugs and fixes.
> Subject: Re: [gme-users] plug-in chain

> 
> Dear Gabor, 
> 
> you can access the code for the GReAT Master interpreter from the 
> MoBIES source safe. If not could someone from the GReAT team sent 
> Gabor a copy of the files? 
> 
> There you should look at the file called RawComponent.cpp. It will 
> be quite easy once you see the example. 
> 
> Thanks, 
> Adi 
> 
> -----------------------------------
> Aditya Agrawal
> Researcher
> IBM T. J. Watson
> mailto:aagrawa at us.ibm.com
> +1 (914) 784-6068 (TL 863)
> 
> 
> gme-users-bounces at list.isis.vanderbilt.edu wrote on 04/18/2005 12:23:38 
PM:
> 
> > Hello!
> > 
> > Someone can tell me how can I call a plug-in/interpreter in an other
> > plug-in/interpreter in BON2/Visual C++ framework. I would like to 
> > create a "call chain" where one interpreter offers some input to the
> > next interpreter, and call it automatically like in GReaT where 
> > Master Interpreter can call the Graph Rewriter Engine.
> > 
> > Thanks,
> > 
> > Gabor Batori
> > _______________________________________________
> > gme-users mailing list
> > gme-users at list.isis.vanderbilt.edu
> > http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20050421/07be5147/attachment.htm


More information about the gme-users mailing list