[gme-users] Creation of a Connection
ksmyth at isis.vanderbilt.edu
Wed Dec 28 10:42:09 CST 2011
The ConnectionEnds in Connection::create represent the source and
destination of the connection. BON::FCO inherits from ConnectionEnd. For
BON::Atom srcClass, dstClass;
Connection conn = Connection::create(BON::Model(currentFCO), srcClass,
For the UML paradigm, ConnectionEnds are equivalent to FCOs, since the
UML paradigm has no refports.
An example of a BON2 interpreter is under C:\Program
Files\GME\Paradigms\SF\BON2SFInterpreter, but this interpreter does not
modify the model.
From: gme-users-bounces at list.isis.vanderbilt.edu
[mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Jae
Sent: Wednesday, December 28, 2011 2:00 AM
Subject: [gme-users] Creation of a Connection
I am trying to create a Connection from a plug-in, and I've got a
question about the required attributes.
I'm using GME 9.12.15, and what I'm trying to do is to mimic a user's
operation that creates an Association or a Composition Connection in the
UML editor that comes with GME.
Below is what I've tried. If it is a completely wrong way to do this,
please guide me to the right way ...
I was able to create other objects by a line of code like:
>> Atom atom (Atom::create(m, type));
where m is the parent model and type is the metatype of the new Atom.
I was able to update its relative ID, name, and attributes later to have
the Atom that I wanted.
Now, I'm trying to create a Connection through a similar way, but I
don't know what to pass as attributes to the creator function.
Connection Connection::create( const Model& parent, const ConnectionEnd&
srcEnd, const ConnectionEnd& dstEnd, const MON::Connection& meta, const
std::string& strRole )
Above is one of the creators of Connection. There are a number of them,
and all of them require a pair of ConnectionEnds as attributes. I don't
get what they are...
If there is a piece of example code, would you please let me know where
it is? Or, please let me know what ConnectionEnds are to use this
function to create a Connection.
Thank you very much.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gme-users