[gme-users] Query regarding BON2 interpreter
zolmol at isis.vanderbilt.edu
Tue Aug 8 10:37:02 CDT 2006
You can just put s0 and s1 instead of srcEnd and dstEnd, because
BON::Model inherits from BON::ConnectionEnd.
conn->create(SM, s0, s1, string("Transition"));
> -----Original Message-----
> From: gme-users-bounces at list.isis.vanderbilt.edu
> [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf
> Of damathai at vt.edu
> Sent: Monday, August 07, 2006 11:46 PM
> To: gme-users
> Subject: [gme-users] Query regarding BON2 interpreter
> Hello there,
> My name is Deepak Mathaikutty and i'm a frequent user of GME.
> I would like some help on a problem i'm facing.
> Here is my question:
> I'm constructing a finite state machine from my user model
> created using a metamodel i created in GME. The state machine
> construction is done through the BON2 interpreter.
> So i create states which is pretty straight forward :
> BON::Model s0;
> s0->create(SM, string("State"));
> BON::Model s1;
> s1->create(SM, string("State"));
> Assume SM to be the toplevel which acts as the parent for the
> state machine and State is a <<model>> entity in my metamodel.
> Now my question is I want to connect these states by creating
> a transition, which is a <<model>> entity in my metamodel
> Which would something like this :
> BON::Connection conn;
> conn->create(SM, srcEnd, dstEnd, string("Transition"));
> srcEnd and dstEnd are of type BON::ConnectionEnd.
> So how to initialize or get srcEnd to point to s0 and dstEnd to s1?
> I can not find any appropriate APIs to do so.
> Let me know if i'm not doing it the right way.
> I will be grateful if someone can help me with this.
> Basically i want to create a state machine through the
> interpreter, which requires creating states (this is fine)
> and transitions, which i'm having problems with.
> Thank you,
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
More information about the gme-users