[Uml-devel] Re: Umbrello design (was UML XML tree viewer)
Andrew Sutton
ansutton at kent.edu
Tue Nov 5 06:47:12 UTC 2002
> - Our projects are made of objects which are instances of UML object,
> which themselves are instances of MOF objects. All of which seem to
> have, at the (meta)*model level only getter/setter methods. Why not
> another level which has only 1 class, of which MOF objects are
> instances. Let's call it libOOTU (Lib Origin Of The Universe), which we
> could define for the purpose of our project. Sorry, that may be a dumb
> academic point of view, but I see now that I have been playing with only
> a few snow balls of the UML iceberg...
i mislead you in my previous answer.
for the domain of modeling, MOF is the root of all evil/origin of the
universe. it ends there. so, we end up with 4 levels of "metaness".
M3. meta-metaclass (mof - instances are UML classes)
M2. metaclass (uml - instances are C++ classes)
M1. class (src code)
M0. object (binary code)
the reflective interfaces i mentioned are applied by the MOF standard to M1
level to provide a "gateway" to the M2 level. Qt does something similar to
this with QObject::metaObject() except its at the M0-M1 level.
anyways, i think you can stretch the definition to provide a gateway from any
instance to any class. the instance must be derived from a reflective
interface.
the standard defines a couple: RefObject, RefAssociation and RefPackage.
There's an MOF to Java mapping specification that adds a bunch more,
RefEnumeration, etc. the idea is that when you generate code from an MOF
file, one of these Ref* objects becomes the first super class of the object
being instantiated. e.g. for UML:
class UMLClass :
public RefObject,
public Classifier,
public GeneralizableElement
{...};
anyway, in order to correctly generate C++ from MOF specifications, we need to
adapt the MOF to Java specification for our purposes. that should define how
the code is generated. then we extend it to include libXMI required features
and possibly umbrello required feature and we should be done. yeah!
the only conceptual problem i'm having is this: if UML has reflective features
that allow us to access their meta object definitions, aren't we required to
implement MOF? i guess we could just return NULL if they try to get the meta
object. i can't really even think why they might want to do that. oh well.
back to the design.
andy
More information about the umbrello-devel
mailing list