[gme-users] Query regarding BON2 interpreter

damathai at vt.edu damathai at vt.edu
Tue Aug 8 01:45:32 CDT 2006


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"));
s0->setName(string("STATE0"));

BON::Model s1;
s1->create(SM, string("State"));
s1->setName(string("STATE1"));

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,

Regards,
Deepak


More information about the gme-users mailing list