[Uml-devel] UMLClass details - With a Little Help From My Friends (TM)
Oliver.Kellogg at t-online.de
Tue Dec 2 13:39:04 UTC 2003
Jonathan Riddell wrote:
> On Tue, Dec 02, 2003 at 12:21:55PM +0100, BARTKO, Zoltan wrote:
> > But I am stuck with classes. How do I find the UMLClass corresponding
> > to a particular UMLObject? I want to know the attributes, operations,
> > templates of the Class, but I only have access to the UMLObject. How
> > to do that?
> I suspect you have to cast it to a UMLClass. [...]
To this end you can use the getBaseType() method to determine
it's a class (i.e. the Uml::UMLObject_Type is ot_Class), and
then you can static_cast<UMLClass*> your pointer to UMLObject.
Oliver M. Kellogg
More information about the umbrello-devel