In other cases, such asXMF-Mosaic, the mapping is made in three stages. The ?¬?rst
stage maps the model elements to an intermediate set of concepts corresponding to a
broad kind of programming language??”most likely object-oriented languages. The
second stage maps each of these generic object-oriented concepts to the
corresponding concept in a particular object-oriented language. Finally, the third
stage generates the relevant code for that concept in that language. Such an approach
would be useful if a company needed to generate the same application in a growing
number of object-oriented languages: they could add new second- and third-level
mappings as the need for those languages appeared. However, it is limiting if the need
is only for one or two languages: the generator must follow the patterns and structures
laid down by the tool vendor.
The set of output language structures supported for mappings would normally
include the major higher-level structures such as functions, classes, and modules. If
strongly linked with a particular Integrated Development Environment (IDE) or IDEs
it could also extend up to projects. If linked to a particular kind of language, it could
also extend down to control structures. Building a mapping for such extended model
visitors would however become increasingly dif?¬?cult, as the various parts of, say, a C
for loop must each be mapped to some structure in the model.
Pages:
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500