Skip to content
Ryan Heaton edited this page Sep 17, 2015 · 1 revision

C Module

The C module generates C data structures and (de)serialization functions that can be used in conjunction with libxml2 to (de)serialize the REST resources as they are represented as XML data.

Configuration

The C module is configured with the c element under the modules element of the enunciate configuration file. The following attributes are supported on the c element:

attribute description
label The "label" attribute is the label for the C API. This is the name by which the file will be identified (producing [label].c). By default the label is the same as the Enunciate project label.
forceEnable The "forceEnable" attribute is used to force-enable the C module. By default, the C module is enabled only if REST endpoints are found in the project.
enumConstantNamePattern The "enumConstantNamePattern" attribute defines the format string for converting an enum constant name to a unique c-style constant name. The arguments passed to the format string are: (1) the project label (2) the namespace id of the type definition (3) the name of the type definition (4) the NOT decapitalized annotation-specified client name of the type declaration (5) the decapitalized annotation-specified client name of the type declaration (6) the NOT-decapitalized simple name of the type declaration (7) the decapitalized simple name of the type declaration (8) the package name (9) the annotation-specified client name of the enum contant (10) the simple name of the enum constant. All tokens will be "scrubbed" by replacing any non-word character with the "_" character. The default value for this pattern is %1$S_%2$S_%3$S_%9$S.
typeDefinitionNamePattern The "typeDefinitionNamePattern" attribute defines the format string for converting an type definition name to a unique c-style name. The arguments passed to the format string are: (1) the project label (2) the namespace id of the type definition (3) the name of the type definition (4) the NOT decapitalized annotation-specified client name of the type declaration (5) the decapitalized annotation-specified client name of the type declaration (6) the NOT-decapitalized simple name of the type declaration (7) the decapitalized simple name of the type declaration (8) the package name. All tokens will be "scrubbed" by replacing any non-word character with the "" character. The default value for this pattern is "%1$s%2$s_%3$s".
separateCommonCode The 'separateCommonCode' attribute tells Enunciate to keep the code that is common to all Enunciate-generated projects separate from the code that is generated specifically for this project. Default: true.

Elements

The c element supports the following child elements:

facets

Facet configuration for the module. See Facets.

Clone this wiki locally