[gme-users] accessing attributes in GME constraints

Zoltan Molnar zolmol at isis.vanderbilt.edu
Mon Jun 18 10:43:38 CDT 2007


Hi Rajesh

Try the following form: 

fco.attribute( "<<attrname>>")

Zoli

> -----Original Message-----
> From: gme-users-bounces at list.isis.vanderbilt.edu 
> [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf 
> Of Rajesh Kumar
> Sent: Monday, June 18, 2007 10:38 AM
> To: gme-users
> Subject: [gme-users] accessing attributes in GME constraints
> 
> 
> Hi guys,
> 
> I am trying to define some simple constraints in GME and I am 
> confused about how to access attributes of entities.
> 
> I have a "Connection" object which connects a FCO called 
> "NetInterface" and an Atom (called "Port" in the model). 
> "Port" is a subclass of "NetInterface". "NetInterface" has a 
> string attribute called "att_protocol_name"
> 
> I want to specify the constraint that "in a connection both 
> ends must have the same protocol name"
> 
> I create a constraint in the constraints aspect and attach it 
> to the Connection object of interest. Now I try to specify 
> the constraint as
> follows:
> 
> self.connectionPoints("src")->theOnly().target().att_protocol_
> name = 
> self.connectionPoints("dst")->theOnly().target().att_protocol_name
> 
> -- This gives an error saying that Attribute 
> [gme::FCO::att_protocol_name] does not exist
> 
> I have looked through the manual and everything but I cannot 
> figure this out. Can anyone help me out here?
> 
> Rajesh
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
> 


More information about the gme-users mailing list