[gme-users] Creation of a Connection

Jae young Bang jaeyounb at usc.edu
Wed Dec 28 01:59:51 CST 2011


Hello,

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.

~Jae
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20111228/162436b6/attachment.html 


More information about the gme-users mailing list