Ph.D. - geht es zur Homepage der Informatik des Fachbereiches 3 ...
Ph.D. - geht es zur Homepage der Informatik des Fachbereiches 3 ...
Ph.D. - geht es zur Homepage der Informatik des Fachbereiches 3 ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Chapter 4. The GOPPRR Meta Meta Model – An Extension of GOPRR<br />
∗ \param [ in ] bUseException : o p t i o n a l Boolean f l a g f o r throwing an e x c e p t i o n<br />
∗ in case o f an empty map<br />
∗ \ r e t u r n map o f p o i n t e r s to r o l e s<br />
∗/<br />
: : std : : map< : : std : : s t r i n g , GOPPRR: : CRole∗ ><br />
Rol<strong>es</strong> (GOPPRR: : CObject ∗ const pObject ,<br />
const : : std : : s t r i n g& Type ,<br />
const bool& bSubString = false ,<br />
const bool& bUseException = true<br />
) const throw ( : :GOPPRR: : Error : : CEmpty) ;<br />
All abstraction methods can be found in Section E.1. Details about the deployment and the<br />
implementation are discussed in Chapter 9 along with the openETCS case study code generator<br />
application.<br />
Limitations It is nec<strong>es</strong>sary to remark that a concrete GOPPRR C++ abstract syntax model<br />
only holds information about the related model but not about the related meta model. This<br />
means, for example, that for two instanc<strong>es</strong> of CObject no information is available if they are<br />
sub- and parent-type, or not. Neverthel<strong>es</strong>s, this is not a major disadvantage because the meta<br />
modelling and the modelling itself should only be related to the modeller, which means here<br />
MetaEdit+.<br />
4.3. GOPPRR XML Schema Definition<br />
To transform an internal MetaEdit+ GOPPRR model 4 , an interface between MetaEdit+ and<br />
the custom generator or rather C++ abstract syntax model has to be <strong>es</strong>tablished. This is done<br />
by XML as an intermediate model repr<strong>es</strong>entation. As already introduced in Subsection 3.1.3,<br />
the XML Schema Definition [42, 70] provid<strong>es</strong> a dictionary definition mechanism for XML.<br />
Accordingly, a concrete instance of a XSD can be interpreted as meta model while an XML<br />
valid to the Schema corr<strong>es</strong>ponds to a model instance (Figure 3.10).<br />
The fact that XSD provid<strong>es</strong> an object-oriented syntax enabl<strong>es</strong> the definition of the XML<br />
Schema in the exact same manner as the GOPPRR C++ abstract syntax model in Figure 4.4.<br />
Furthermore, the usage of so-called key and keyref [42] elements provid<strong>es</strong> the definition of an<br />
even more detailed meta meta model. The C++ abstract syntax model only defin<strong>es</strong> that all<br />
GOPPRR elements are instanc<strong>es</strong> / objects in a project object, but in all other associations<br />
among the model those are only connected by referenc<strong>es</strong> / pointers [79]. An important constraint<br />
is that all GOPPRR elements referenced at any point of the model must occur once as instance<br />
in the related project object. The definition of this constraint in the XSD for GOPPRR ren<strong>der</strong>s<br />
the integration into the C++ model unnec<strong>es</strong>sary because it is always instantiated by a XML<br />
model fulfilling it. The complete GOPPRR XSD is located in Section E.2 in the appendix.<br />
4.4. MERL GOPPRR Generator<br />
The generator for transforming GOPRR models in MetaEdit+ to external XML GOPPRR fil<strong>es</strong><br />
is briefly introduced here. Corr<strong>es</strong>ponding to the requirement that the GOPPRR C++ abstract<br />
4 GOPPRR model means a concrete instance of a meta model in GOPRR.<br />
46