Introduction

This chapter describes the code generators in the CCM Tools. A library like the CCM metamodel greatly facilitates tasks like code generation. However, such libraries usually provide an API that is too low-level to be of concern for direct users, so the CCM Tools include some base classes that support code generators at a higher level. This chapter focuses on development topics related to subclasses of the abstract CodeGenerator class.

Figure 4.1: Component generation tools.
\includegraphics[width=\textwidth]{ComponentGeneratorTools}

The chapter is laid out in three major parts. First comes a design overview, which describes the class and interface design, and outlines template interactions in the component generator tools. The second part is a tutorial that describes how to create a new code generator, and the third part presents an example of how to maintain an existing code generator. Generally, the three parts in this chapter proceed from a more theoretical, developer-oriented point of view to a more practical, maintainer-oriented point of view.

Before you begin, note that the rest of this chapter uses the term ``graph'' to refer to a CCM metamodel graph instance in memory. Usually such graphs are created by the IDL3 Parser by parsing an input IDL3 file, as described in Chapter 3.

2003-11-09