[gme-users] RE: Questions

Zoltan Molnar zolmol at isis.vanderbilt.edu
Wed Mar 23 15:38:13 CST 2005


Hi,

In Bon2 you can access from a reference the Referred object by writing:
myref->getReferred()

If you have a connection then you can use these:

std::multiset<ConnectionEnd> 	result = myConn->getConnEnds();
ConnectionEnd cend = myConn->getSrc();
ConnectionEnd cend = myConn->getDst();

The other way:
If you have any fco, inquiring if it has any references:

std::set<Reference> refs_to_me = fco->getReferredBy()

Inquiring its connections:
std::set<Connection> my_conns = fco->getConnLinks()
std::set<Connection> my_conns = fco->getInConnLinks()
std::set<Connection> my_conns = fco->getOutConnLinks()

Or the connected objects ("connection ends") directly of the connections
above:

std::multiset<ConnectionEnd> c_ends = fco->getInConnEnds()
std::multiset<ConnectionEnd> c_ends = fco->getOutConnEnds()
std::multiset<ConnectionEnd> c_ends = fco->getConnEnds()
std::multiset<ConnectionEnd> c_ends = fco->getConnEndsAs()

ConnectionEnd (ConnectionEndImpl) is a supertype of FCO (FCOImpl) and
ReferencePort (ReferencePortImpl).
You may try to cast these ConnectionEnds to FCOs, if succeeds then you
have really an FCO as connection end. Otherwise cast to ReferencePort,
this succeeds when you have a connection through a referenceport.

Btw, you can use the "BonExtender" interpreter on your metamodel, that
will generate your paradigm specific BON from your paradigm.

Regards, Zoli

> -----Original Message-----
> From: Akos Ledeczi 
> Sent: Wednesday, March 23, 2005 11:26 AM
> To: Naiser, Samuel L; gme-users; Zoltan Molnar
> Subject: Re: Questions
> 
> 
> Sam,
> 
> the list I cc-d this reply is the best place to post questions like 
> this. I am also asking Zoltan Molnar, our resident BON2 
> expert to answer 
> your questions. Regards,
> 
> Akos
> 
> 
> Naiser, Samuel L wrote:
> > I am starting a project at Lockheed Martin to model message 
> processing
> > 
> > within the F/A-22.  I have created my first MetaModel and 
> am coding a
> > 
> > custom Interpreter to create output to an Analyzer.  I have 
> been able
> > 
> > to trace down the parent/child relationships successfully, 
> but need to
> > 
> > get to the Reference relationships and the Connections between
> > 
> > Models. I have been unable to find a way using BON2 to capture this
> > 
> > information.
> > 
> > Can you please provide some information on how to capture Connection
> > 
> > and Reference information.  Or is there a better place to post this
> > question?
> > 
> > Thank you in advance.
> > 
> > Sam Naiser
> > 
> >  
> > 
> > *Samuel L Naiser*
> > 
> > Lockheed Martin Aeronautics
> > 
> > samuel.l.naiser at lmco.com
> > 
> > Office:  817-935-3839
> > 
> >  
> > 
> 


More information about the gme-users mailing list