[gme-users] instance's type

Vijdan KIZILAY vkizilay at gmail.com
Tue Aug 25 10:37:15 CDT 2009


Hi,
I am trying to get  the type name of an instance. But how is it possible? In
user manual, part: "Type inheritance in BON2" (page 109) it says:


"After a simple cast the user may obtain the type of the instance or the
subtypes of the type. "

but I can not get the Type name of aan instance as a string  or another
printable format(in my exampe it is "Ship").

For example My Type is Ship and its instance is RegisteredShipObject. When I
reach the RegisteredShipObject in the code below,
I can not get the type name which is Ship in my code?

getType returns ok but how can I get the name of the type? (how can I
achieve this casting operation)
I can not find a function like oo->getType()->getName()?

Here is my code:

for
( std::set<BON::Reference>::iterator iter = referenceSet.begin(); iter !=
referenceSet.end(); iter++ )
{
if( (*iter)->getObjectMeta().displayedName() == "OCReference" )
{
BON::FCO mscModel = (*iter)->getReferred();
BON::TypeInhObject oo = mscModel->getTypeInhObject();
if (  oo ->getType() )
{
 //I want to get name of type --- here Ship --
}
}
}




On Tue, Aug 25, 2009 at 6:13 PM, Peter Volgyesi <peter.volgyesi at gmail.com>wrote:

> Hi,
>
> Do you need the meta "type" (kind) of the object or the archetype (if
> you are using the type/instance feature of GME) ?
> The first can be accessed by getFCOMeta (or more specialized methods
> for atoms, models, etc. by calling getXYMeta()).
> The second can be acquired by calling getType().
> Please, check the GME User Manual if you are not familiar with the
> "type/instance" feature.
> Regards,
>
> --
> peter
>
>
>
> On Tue, Aug 25, 2009 at 5:02 AM, Vijdan KIZILAY<vkizilay at gmail.com> wrote:
> > Hello,
> >
> > How can I take a type of a instance with BON2?
> >
> > I can take name, role, kind but I could not take the type of instance..
> > How can be the instance's type taken?
> >
> > I can get BON::Type but I can not get the name of type.
> >
> > Vijdan
> >
> > _______________________________________________
> > gme-users mailing list
> > gme-users at list.isis.vanderbilt.edu
> > http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
> >
> >
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20090825/157ed5ba/attachment.html 


More information about the gme-users mailing list