[gme-users] How to get the derived classes of one base class in the<<connection>>

Matthew J. Emerson mjemerson at isis.vanderbilt.edu
Fri Jun 23 10:33:31 CDT 2006

C++ cast operators won't work but the derived types will have constructors
which accept the base type.


-----Original Message-----
From: gme-users-bounces at list.isis.vanderbilt.edu
[mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of ???
Sent: Friday, June 23, 2006 9:27 AM
To: gme-users
Subject: [gme-users] How to get the derived classes of one base class in


   I meet with a problem.In my meta-model, one <<connection>> called
"DataLink" connects two Ends,the src is an abstract <<Atom>> called
"BaseType", the dst is an <<atom>> called EditBox. two <<atom>>s  called
"Float" and "Int" inherit "BaseType".

In my user-model,a true Int <<Atom>> connects a EditBox by a "DataLink"
line.When developing interpreter,I want to get the Int class instead of
BaseType class.But I only find the following  method:

BaseType  DataLinkImpl::getSrc()
    BON::ConnectionEnd ce = ConnectionImpl::getSrc();
	BaseType sp( ce);
	if ( sp)
		return sp;

	BaseType empty;
	return empty;  

I try to translate base class "BastType" into "Int" or "Float" class by
I failed. 

BaseType bt=DataLink->getSrc();
Int myInt(bt);

failed again.

help me!!    thanks!


  Ph.D Candidate
  College of Automation Engineering, South China University of Technology, 
  Guangzhou, China.
  Phone: +86-20-87114637
  Email: zgshu2004 at 163.com

gme-users mailing list
gme-users at list.isis.vanderbilt.edu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4509 bytes
Desc: not available
Url : http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20060623/f131adf7/smime.bin

More information about the gme-users mailing list