Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef ZORBA_OPTIONS_H
00017 #define ZORBA_OPTIONS_H
00018 #include <zorba/config.h>
00019
00020 #ifdef __cplusplus
00021 #include <vector>
00022 #include <zorba/zorba_string.h>
00023 #endif
00024
00025
00026
00027 typedef enum {
00028 ZORBA_OPT_LEVEL_O0,
00029 ZORBA_OPT_LEVEL_O1,
00030
00031
00032 ZORBA_OPT_LEVEL_O2
00033
00034
00035
00036
00037 } Zorba_opt_level_t;
00038
00039 #if !defined(__cplusplus)
00040 typedef enum { false = 0, true = 1 } bool;
00041 #endif
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 typedef struct Zorba_CompilerHints
00055 {
00056
00057 Zorba_opt_level_t opt_level;
00058
00059 bool lib_module;
00060
00061
00062
00063
00064
00065
00066 bool for_serialization_only;
00067
00068 #ifdef __cplusplus
00069
00070
00071
00072
00073
00074
00075 ZORBA_DLL_PUBLIC Zorba_CompilerHints();
00076 #endif
00077 } Zorba_CompilerHints_t;
00078
00079
00080 typedef enum
00081 {
00082 ZORBA_SERIALIZATION_METHOD_XML,
00083 ZORBA_SERIALIZATION_METHOD_HTML,
00084 ZORBA_SERIALIZATION_METHOD_XHTML,
00085 ZORBA_SERIALIZATION_METHOD_TEXT,
00086 ZORBA_SERIALIZATION_METHOD_BINARY
00087 } Zorba_serialization_method_t;
00088
00089
00090 typedef enum
00091 {
00092 ZORBA_BYTE_ORDER_MARK_YES,
00093 ZORBA_BYTE_ORDER_MARK_NO
00094 } Zorba_byte_order_mark_t;
00095
00096
00097 typedef enum
00098 {
00099 ZORBA_ESCAPE_URI_ATTRIBUTES_YES,
00100 ZORBA_ESCAPE_URI_ATTRIBUTES_NO
00101 } Zorba_escape_uri_attributes_t;
00102
00103 typedef enum {
00104 ZORBA_INCLUDE_CONTENT_TYPE_YES,
00105 ZORBA_INCLUDE_CONTENT_TYPE_NO
00106 } Zorba_include_content_type_t;
00107
00108 typedef enum {
00109 ZORBA_INDENT_YES,
00110 ZORBA_INDENT_NO
00111 } Zorba_indent_t;
00112
00113 typedef enum {
00114 ZORBA_NORMALIZATION_FORM_NFC,
00115 ZORBA_NORMALIZATION_FORM_NFD,
00116 ZORBA_NORMALIZATION_FORM_NFKC,
00117 ZORBA_NORMALIZATION_FORM_NFKD,
00118 ZORBA_NORMALIZATION_FORM_FULLY_normalized,
00119 ZORBA_NORMALIZATION_FORM_NONE
00120 } Zorba_normalization_form_t;
00121
00122 typedef enum {
00123 ZORBA_OMIT_XML_DECLARATION_YES,
00124 ZORBA_OMIT_XML_DECLARATION_NO
00125 } Zorba_omit_xml_declaration_t;
00126
00127 typedef enum {
00128 ZORBA_STANDALONE_YES,
00129 ZORBA_STANDALONE_NO,
00130 ZORBA_STANDALONE_OMIT
00131 } Zorba_standalone_t;
00132
00133 typedef enum {
00134 ZORBA_UNDECLARE_PREFIXES_YES,
00135 ZORBA_UNDECLARE_PREFIXES_NO
00136 } Zorba_undeclare_prefixes_t;
00137
00138 typedef enum {
00139 ZORBA_ENCODING_UTF8,
00140 ZORBA_ENCODING_UTF16
00141 } Zorba_encoding_t;
00142
00143 typedef enum {
00144 ZORBA_USE_BINARY_ARCHIVE,
00145 ZORBA_USE_XML_ARCHIVE
00146 } Zorba_binary_plan_format_t;
00147
00148 typedef enum {
00149 DONT_SAVE_UNUSED_FUNCTIONS = 0,
00150 SAVE_UNUSED_FUNCTIONS = 1
00151 } Zorba_save_plan_options_t;
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161 #ifdef __cplusplus
00162 typedef struct ZORBA_DLL_PUBLIC Zorba_SerializerOptions
00163 {
00164 Zorba_serialization_method_t ser_method;
00165 Zorba_byte_order_mark_t byte_order_mark;
00166 Zorba_escape_uri_attributes_t escape_uri_attributes;
00167 Zorba_include_content_type_t include_content_type;
00168 Zorba_indent_t indent;
00169 Zorba_normalization_form_t normalization_form;
00170 Zorba_omit_xml_declaration_t omit_xml_declaration;
00171 Zorba_standalone_t standalone;
00172 Zorba_undeclare_prefixes_t undeclare_prefixes;
00173 Zorba_encoding_t encoding;
00174
00175 zorba::String media_type;
00176 zorba::String doctype_system;
00177 zorba::String doctype_public;
00178 zorba::String cdata_section_elements;
00179 zorba::String version;
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197 Zorba_SerializerOptions();
00198
00199
00200
00201
00202
00203
00204 void SetSerializerOption(const char* parameter, const char* value);
00205
00206
00207
00208
00209
00210
00211 static Zorba_SerializerOptions SerializerOptionsFromStringParams(const std::vector<std::pair<std::string,std::string> >& params);
00212
00213 } Zorba_SerializerOptions_t;
00214 #endif
00215
00216
00217 #ifndef __cplusplus
00218 struct Zorba_SerializerOptions;
00219 typedef struct Zorba_SerializerOptions Zorba_SerializerOptions_t;
00220 #endif
00221
00222
00223 #ifdef __cplusplus
00224 extern "C" {
00225 #endif
00226
00227
00228
00229
00230
00231 ZORBA_DLL_PUBLIC void Zorba_CompilerHints_default(Zorba_CompilerHints_t*);
00232
00233
00234
00235
00236
00237
00238
00239
00240 ZORBA_DLL_PUBLIC Zorba_SerializerOptions_t* Zorba_SerializerOptions_default();
00241
00242
00243
00244
00245
00246 ZORBA_DLL_PUBLIC void Zorba_SerializerOptions_free(Zorba_SerializerOptions_t* serializerOptions);
00247
00248
00249
00250
00251
00252
00253
00254
00255 ZORBA_DLL_PUBLIC void Zorba_SerializerOptions_set(Zorba_SerializerOptions_t* serializerOptions, const char* parameter, const char* value);
00256
00257
00258 #ifdef __cplusplus
00259 }
00260 #endif
00261
00262 #endif
00263
00264