Implementation (.c) files

The implementation (.c) file contains implementations of operations (methods) whose prototypes are defined in the specification file.

For example, when you run the HelloWorld sample, one of the generated files is Default.c.

Multiline file header

As with specification files, implementation files begin with a multiline header. The C_CG::File::ImplementationHeader property determines the content of the header. By default, the value of this property is the same as the SpecificationHeader property.

Preprocessor directives

The next section of the file lists the specification files of related packages, objects, and object types. For example, the Default.h file includes the following files:


#include <oxf/RiCTask.h>
#include "Display.h"

To include additional files, use the C_CG::Class::ImpIncludes property.

Serializing global variables for instrumentation

The next section of the implementation file defines global variables and methods for serializing global variables for instrumentation. If the implementation file is for a package, this section also defines methods to initialize the events in the package, and to clean up memory when the package is destroyed.

Method implementations

The next section of the implementation file implements the bodies of both user‑defined (explicit) and automatically generated (implicit) methods.

File footer

As with specification files, the implementation file ends with a multiline footer whose content is determined by the C_CG::File::ImplementationFooter property. By default, the value of this property is the same as the SpecificationFooter property.