exip  Alpha 0.5.4
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
schemaOutputUtils.h File Reference

Utility functions for storing EXIPSchema instances to external streams. More...

#include "procTypes.h"
#include "createGrammars.h"

Go to the source code of this file.

Data Structures

struct  IndexStrings
 

Macros

#define VAR_BUFFER_MAX_LENGTH   200
 

Functions

errorCode textGrammarOutput (QNameID qnameid, Index grIndex, EXIGrammar *gr, EXIPSchema *schema, FILE *out)
 TEXT OUTPUT DEFINITIONS. More...
 
errorCode recursiveTextGrammarOutput (QNameID qnameid, Index grIndex, EXIGrammar *gr, EXIPSchema *schema, FILE *out)
 Recursively builds an EXI grammars text representation and stores it in out. More...
 
void staticStringDefOutput (String *str, char *varName, FILE *out)
 STATIC CODE OUTPUT DEFINITIONS. More...
 
void staticStringTblDefsOutput (UriTable *uriTbl, char *prefix, FILE *out)
 Builds all the CharType* arrays of all strings in the string tables of a schema as a static code representation. More...
 
void staticPrefixOutput (PfxTable *pfxTbl, char *prefix, Index uriId, Deviations dvis, FILE *out)
 Builds an prefix table static code representation and stores it in out. More...
 
void staticProductionsOutput (EXIGrammar *gr, char *prefix, Index grId, FILE *out)
 Builds all grammar productions for a grammar as a static code representation and stores it in out. More...
 
void staticRulesOutput (EXIGrammar *gr, char *prefix, Index grId, FILE *out)
 Builds all grammar rules for a grammar as a static code representation and stores it in out. More...
 
void staticDocGrammarOutput (EXIGrammar *docGr, char *prefix, FILE *out)
 Builds the document grammar as a static code representation and stores it in out. More...
 
void staticLnEntriesOutput (LnTable *lnTbl, char *prefix, Index uriId, Deviations dvis, FILE *out)
 Builds all the LN entries in a LnTable as a static code representation and stores it in out. More...
 
void staticUriTableOutput (UriTable *uriTbl, char *prefix, Deviations dvis, FILE *out)
 Builds all the URI entries in the UriTable as a static code representation and stores it in out. More...
 
void staticEnumTableOutput (EXIPSchema *schema, char *prefix, FILE *out)
 Builds all the Enumeration definitions. More...
 
errorCode dynExipSchemaOutput (EXIPSchema *schema, char *prefix, unsigned char mask_specified, unsigned char mask_strict, unsigned char mask_sc, unsigned char mask_preserve, FILE *out)
 DYNAMIC CODE OUTPUT DEFINITIONS. More...
 

Detailed Description

Date
May 7, 2012
Author
Rumen Kyusakov
Version
0.5
[Revision] $Id: schemaOutputUtils.h 352 2014-11-25 16:37:24Z kjussakov $

Definition in file schemaOutputUtils.h.

Macro Definition Documentation

#define VAR_BUFFER_MAX_LENGTH   200

Definition at line 24 of file schemaOutputUtils.h.

Function Documentation

errorCode dynExipSchemaOutput ( EXIPSchema schema,
char *  prefix,
unsigned char  mask_specified,
unsigned char  mask_strict,
unsigned char  mask_sc,
unsigned char  mask_preserve,
FILE *  out 
)

Builds an EXISchema dynamic code representation and stores it in out Creates a code that returns a function definition that dynamically creates EXISchema instances

Parameters
[in]schemaEXISchema instance to be stored
[in]prefixprefix for the definitions
[in]mask_specifiedwhether options and EXI header parameters are set
[in]mask_strictvalue of strict option
[in]mask_scvalue of self contained option
[in]mask_preservevalue of preserve option
[out]outoutput stream
Returns
Error handling code

Definition at line 24 of file dynOutputUtils.c.

errorCode recursiveTextGrammarOutput ( QNameID  qnameid,
Index  grIndex,
EXIGrammar gr,
EXIPSchema schema,
FILE *  out 
)

All referenced grammars through SE(QName) are also written to the output

Parameters
[in]qnameidthe qnameid of the EXI grammar
[in]grIndexindex in the schema grammar table
[in]grEXI grammar to be stored
[in]schemathe EXIPSchema instance
[out]outoutput stream
Returns
Error handling code

Definition at line 174 of file textOutputUtils.c.

void staticDocGrammarOutput ( EXIGrammar docGr,
char *  prefix,
FILE *  out 
)
Parameters
[in]docGrdocument grammar from the EXIPSchema object
[in]prefixprefix for the definitions
[out]outoutput stream

Definition at line 169 of file staticOutputUtils.c.

void staticEnumTableOutput ( EXIPSchema schema,
char *  prefix,
FILE *  out 
)
Parameters
[in]schemaEXISchema instance
[in]prefixprefix for the definitions
[out]outoutput stream

Definition at line 325 of file staticOutputUtils.c.

void staticLnEntriesOutput ( LnTable lnTbl,
char *  prefix,
Index  uriId,
Deviations  dvis,
FILE *  out 
)
Parameters
[in]lnTblthe LnTable instance
[in]prefixprefix for the definitions
[in]uriIduriId for that LnTable
[in]dvisthe number of deviations in url, ln, pfx and grammars
[out]outoutput stream

Definition at line 232 of file staticOutputUtils.c.

void staticPrefixOutput ( PfxTable pfxTbl,
char *  prefix,
Index  uriId,
Deviations  dvis,
FILE *  out 
)
Parameters
[in]pfxTblprefix string table to be stored
[in]prefixprefix for the definitions
[in]uriIduriId of the prefix
[in]dvisthe number of deviations in url, ln, pfx and grammars
[out]outoutput stream

Definition at line 209 of file staticOutputUtils.c.

void staticProductionsOutput ( EXIGrammar gr,
char *  prefix,
Index  grId,
FILE *  out 
)
Parameters
[in]grEXI grammar containing the productions to be stored
[in]prefixprefix for the definitions
[in]grIdindex of the grammar in the SchemmaGrammarTable
[out]outoutput stream

Definition at line 105 of file staticOutputUtils.c.

void staticRulesOutput ( EXIGrammar gr,
char *  prefix,
Index  grId,
FILE *  out 
)
Parameters
[in]grEXI grammar containing the productions to be stored
[in]prefixprefix for the definitions
[in]grIdindex of the grammar in the SchemmaGrammarTable
[out]outoutput stream

Definition at line 136 of file staticOutputUtils.c.

void staticStringDefOutput ( String str,
char *  varName,
FILE *  out 
)

Builds a static code representation of a CharType* array of a string

Parameters
[in]strthe String instance
[in]varNamethe name of the static code variable
[out]outoutput stream

Definition at line 53 of file staticOutputUtils.c.

void staticStringTblDefsOutput ( UriTable uriTbl,
char *  prefix,
FILE *  out 
)
Parameters
[in]uriTblthe UriTable instance containing the string table entries
[in]prefixprefix for the definitions
[out]outoutput stream

Definition at line 74 of file staticOutputUtils.c.

void staticUriTableOutput ( UriTable uriTbl,
char *  prefix,
Deviations  dvis,
FILE *  out 
)
Parameters
[in]uriTblthe UriTable instance
[in]prefixprefix for the definitions
[in]dvisthe number of deviations in url, ln, pfx and grammars
[out]outoutput stream

Definition at line 274 of file staticOutputUtils.c.

errorCode textGrammarOutput ( QNameID  qnameid,
Index  grIndex,
EXIGrammar gr,
EXIPSchema schema,
FILE *  out 
)

Builds an EXI grammar text representation and stores it in out

Parameters
[in]qnameidthe qnameid of the EXI grammar
[in]grIndexindex in the schema grammar table
[in]grEXI grammar to be stored
[in]schemathe EXIPSchema instance
[out]outoutput stream
Returns
Error handling code

Definition at line 22 of file textOutputUtils.c.