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

C XML Module

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

Configuration

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

attribute description
slug The "slug" attribute is the slug for the C XML API. This is the name by which the file will be identified (producing [slug].c). By default the slug is the same as the Enunciate project slug.
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-xml element supports the following child elements:

facets

Facet configuration for the module. See Facets.

Clone this wiki locally