Adding a superclass reference for subclass objects
Posted: Fri Aug 07, 2009 2:54 pm
by Brian Lucas >> Wed, 30 Nov 2005 1:36:07 GMT
I am trying to add an implicit reference to a class that may reference one of several subclasses of an abstract superclass.
For example:
A =superclass (abstract)
B,C,D = subclasses (real)
E = referencing class (real)
What I want to do is add a reference, say "myA", to class E, where the actual object referenced may be of subclass B, C, or D. If I make the reference point to class A, the model doesn't show the sub-class relationship. Will I still be able to set the references to B, C & D at run-time even though the referenced class is A?
If there's another way to go about this, I'd like to hear that, too. Thanks!
I am trying to add an implicit reference to a class that may reference one of several subclasses of an abstract superclass.
For example:
A =superclass (abstract)
B,C,D = subclasses (real)
E = referencing class (real)
What I want to do is add a reference, say "myA", to class E, where the actual object referenced may be of subclass B, C, or D. If I make the reference point to class A, the model doesn't show the sub-class relationship. Will I still be able to set the references to B, C & D at run-time even though the referenced class is A?
If there's another way to go about this, I'd like to hear that, too. Thanks!