00001 #if !defined(_CONFIG_HPP)
00002 #define _CONFIG_HPP
00003
00004
00005
00006
00007
00008
00009
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061 #define XDFLENGINE_NAME "XDFLengine"
00062 #define XDFLENGINE_VERSION "V1.0"
00063 #define SHOW_VERSION_INFO
00064 #define CHAR_ENCODING_DEFAULT "ISO-8859-1"
00065
00066
00067
00068
00069
00070 #define BEGIN_XDFLENGINE_NS namespace XDFLengine{
00071 #define END_XDFLENGINE_NS }
00072
00073
00074
00075
00076
00077 #ifdef _DEBUG
00078 # define TRACE_DEBUG 0
00079 #else
00080 # define TRACE_DEBUG 0
00081 #endif
00082
00083 #ifdef PLATFORM_WIN32_MSVC
00084 # ifdef _DEBUG
00085 # define _CRTDBG_MAP_ALLOC
00086 # endif
00087 #endif
00088
00089
00090
00091
00092 #ifdef PLATFORM_WIN32_MSVC
00093 #define XDFLENGINE_EXPORT __declspec(dllexport)
00094 #define XDFLENGINE_IMPORT __declspec(dllimport)
00095 #pragma warning( disable : 4251 )
00096 #else
00097 #define XDFLENGINE_EXPORT
00098 #define XDFLENGINE_IMPORT
00099 #endif
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117 #define OTL_ANSI_CPP
00118 //#define OTL_STREAM_POOLING_ON
00119 //#define OTL_EXTENDED_EXCEPTION
00120 //#define OTL_UNCAUGHT_EXCEPTION_ON
00121 //#define OTL_BIND_VAR_STRICT_TYPE_CHECKING_ON
00122 //#define OTL_DEFAULT_NUMERIC_NULL_TO_VAL
00123 //#define OTL_DEFAULT_DATETIME_NULL_TO_VAL
00124 //#define OTL_DEFAULT_STRING_NULL_TO_VAL
00125 //#define OTL_DEFAULT_CHAR_NULL_TO_VAL
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135 #define XMLPROCESSOR_MAX_TAG_SIZE 255
00136 #define XMLPROCESSOR_MAX_ATTRNAME_SIZE 255
00137 #define XMLPROCESSOR_MAX_ATTRVAL_SIZE 1023
00138 #define XMLPROCESSOR_MAX_CHAR_SIZE 1023
00139 #define XMLPROCESSOR_LOGFILESTD "stdout"
00140 #define XMLPROCESSOR_ACTIVEURI "xdfl"
00141 #define XMLPROCESSOR_FILE "file"
00142 #define XMLPROCESSOR_STRING "mem"
00143 #define XMLPROCESSOR_ZIP "zip"
00144 #define XMLPROCESSOR_NULL "null"
00145
00146
00147
00148
00149
00150
00151
00152 #define MEMBUFFER_SEGMENT 1000
00153
00154
00155
00156 #define FILEBUFFER_MAXNAMESIZE 255
00157 #define FILEBUFFER_COPYBUF 32768
00158
00159
00160
00161 #define ZIPBUFFER_COPYBUF 32768
00162
00163
00164
00165
00166
00167
00168
00169 #define REQ_TRUE "1"
00170 #define REQ_FALSE "0"
00171 #define REQ_PARENTOUTPUT "(parent)"
00172 #define REQ_NOOUTPUT "(none)"
00173 #define REQ_NULL "(NULL)"
00174
00175 #define REQ_ERRFATAL "error_fatal"
00176 #define REQ_ERRFATAL_DEF REQ_TRUE
00177
00178 #define REQ_ENCLOSE "enclose"
00179 #define REQ_ENCLOSE_DEF ""
00180
00181 #define REQ_ENCLOSECDATA "enclose_cdata"
00182 #define REQ_ENCLOSECDATA_DEF REQ_FALSE
00183
00184 #define REQ_OUTPUT "output"
00185 #define REQ_OUTPUT_DEF REQ_PARENTOUTPUT
00186
00187 #define REQ_OUTPUTERROR "output_error"
00188 #define REQ_OUTPUTERROR_DEF REQ_NOOUTPUT
00189
00190 #define REQ_COMMENT "comment"
00191
00192
00193
00194
00195 #define VALUESSTREAMER_TAGNAME "VAL"
00196 #define S_VALUESSTREAMER_TAGNAME "_VAL"
00197
00198 #define VALUESSTREAMER_VALUES "values"
00199 #define VALUESSTREAMER_VALUES_DEF REQ_TRUE
00200
00201 #define VALUESSTREAMER_LIST "list"
00202 #define VALUESSTREAMER_LIST_DEF REQ_FALSE
00203
00204 #define VALUESSTREAMER_COUNT "count"
00205 #define VALUESSTREAMER_COUNT_DEF REQ_FALSE
00206 #define VALUESSTREAMER_COUNT_SUFFIX "!"
00207
00208 #define VALUESSTREAMER_FILTER "filter"
00209 #define VALUESSTREAMER_FILTER_DEF ""
00210 #define VALUESSTREAMER_FILTERSEP ","
00211
00212 #define VALUESSTREAMER_SEP "separator"
00213 #define VALUESSTREAMER_SEP_DEF ","
00214
00215 #define VALUESSTREAMER_VALSEP "."
00216
00217
00218
00219
00220 #define NAMEDBUFGETSTREAMER_TAGNAME "BUF_GET"
00221
00222 #define NAMEDBUFGETSTREAMER_NAME "name"
00223
00224
00225
00226
00227 #define NAMEDBUFSETSTREAMER_TAGNAME "BUF_SET"
00228 #define S_NAMEDBUFSETSTREAMER_TAGNAME "_BUF_SET"
00229
00230 #define NAMEDBUFSETSTREAMER_NAME "name"
00231
00232 #define NAMEDBUFSETSTREAMER_CREATE "create"
00233 #define NAMEDBUFSETSTREAMER_CREATE_DEF REQ_FALSE
00234
00235 #define NAMEDBUFSETSTREAMER_TYPE "type"
00236 #define NAMEDBUFSETSTREAMER_TYPE_DEF XMLPROCESSOR_STRING
00237
00238 #define NAMEDBUFSETSTREAMER_FILENAME "file"
00239 #define NAMEDBUFSETSTREAMER_FILENAME_DEF ""
00240
00241
00242
00243
00244
00245 #define NULLSTREAMER_TAGNAME "NULL"
00246
00247
00248
00249
00250 #define LOGSTREAMER_TAGNAME "LOG"
00251
00252
00253
00254
00255 #define RAWSTREAMER_TAGNAME "RAW"
00256
00257
00258
00259
00260 #define SYSTEMSTREAMER_TAGNAME "SYSTEM"
00261
00262
00263
00264
00265 #define IFSTREAMER_TAGNAME "IF"
00266
00267 #define IFSTREAMER_VAL1 "val1"
00268 #define IFSTREAMER_VAL2 "val2"
00269 #define IFSTREAMER_VAL2_DEF "1"
00270
00271 #define IFSTREAMER_OP "op"
00272 #define IFSTREAMER_OPGT "gt"
00273 #define IFSTREAMER_OPLT "lt"
00274 #define IFSTREAMER_OPGTE "gte"
00275 #define IFSTREAMER_OPLTE "lte"
00276 #define IFSTREAMER_OPEQ "eq"
00277 #define IFSTREAMER_OPNE "ne"
00278 #define IFSTREAMER_OPSTREQ "streq"
00279 #define IFSTREAMER_OPSTRNE "strne"
00280 #define IFSTREAMER_OPIN "in"
00281 #define IFSTREAMER_OP_DEF IFSTREAMER_OPSTREQ
00282
00283
00284
00285
00286
00287 #define RAISEERRORSTREAMER_TAGNAME "RAISE_ERROR"
00288
00289 #define RAISEERRORSTREAMER_NUMBER "number"
00290 #define RAISEERRORSTREAMER_NUMBER_DEF "0"
00291
00292 #define RAISEERRORSTREAMER_MESSAGE "message"
00293 #define RAISEERRORSTREAMER_MESSAGE_DEF ""
00294
00295 #define RAISEERRORSTREAMER_FATAL "fatal"
00296 #define RAISEERRORSTREAMER_FATAL_DEF REQ_FALSE
00297
00298
00299
00300
00301
00302 #define LANGLOADSTREAMER_TAGNAME "_LANG_LOAD"
00303 #define LANGLOADSTREAMER_VALSEP "."
00304
00305
00306
00307
00308 #define LANGSETSTREAMER_TAGNAME "LANG_SET"
00309 #define LANGSETSTREAMER_LANGCODE "code"
00310
00311
00312
00313
00314
00315
00316 #define EXECSTREAMER_TAGNAME "EXEC"
00317
00318 #define EXECSTREAMER_NAME "name"
00319 #define EXECSTREAMER_FILENAME "file"
00320
00321 #define EXECSTREAMER_ISOLATE "isolate"
00322 #define EXECSTREAMER_ISOLATE_DEF REQ_TRUE
00323
00324
00325
00326 #define FUNCCALLSTREAMER_TAGNAME "FUNC_CALL"
00327 #define FUNCCALLSTREAMER_NAME "name"
00328 #define FUNCCALLSTREAMER_BUFINPUT "input"
00329
00330
00331
00332 #define FUNCDEFINESTREAMER_TAGNAME "_FUNC_DEFINE"
00333 #define FUNCDEFINESTREAMER_NAME "name"
00334
00335
00336
00337 #define CACHESCRIPTSTREAMER_TAGNAME "_CACHE_SCRIPT"
00338 #define CACHESCRIPTSTREAMER_NAME "name"
00339
00340
00341
00342 #define CACHEDEFINITIONSTREAMER_TAGNAME "_CACHE_DEFINITION"
00343 #define CACHEDEFINITIONSTREAMER_NAME "name"
00344
00345
00346
00347
00348 #define FSGETSTREAMER_TAGNAME "FS_GET"
00349
00350 #define FSGETSTREAMER_TARGET "target"
00351
00352 #define FSGETSTREAMER_STREAMDATA "streamdata"
00353 #define FSGETSTREAMER_STREAMDATA_DEF 0
00354
00355
00356
00357
00358 #define FSSETSTREAMER_TAGNAME "FS_SET"
00359
00360 #define FSSETSTREAMER_TARGET "target"
00361
00362 #define FSSETSTREAMER_HEADER "header"
00363 #define FSSETSTREAMER_HEADER_DEF ""
00364
00365 #define FSSETSTREAMER_ACTION "action"
00366 #define FSSETSTREAMER_ACTION_APPEND "append"
00367 #define FSSETSTREAMER_ACTION_DELETE "delete"
00368 #define FSSETSTREAMER_ACTION_FLUSH "flush"
00369 #define FSSETSTREAMER_ACTION_DEF FSSETSTREAMER_ACTION_FLUSH
00370
00371
00372
00373
00374 #define UNZIPSTREAMER_TAGNAME "GZ_GET"
00375
00376 #define UNZIPSTREAMER_TARGET "target"
00377
00378 #define UNZIPSTREAMER_STREAMDATA "streamdata"
00379 #define UNZIPSTREAMER_STREAMDATA_DEF 0
00380
00381
00382
00383
00384 #define ZIPSTREAMER_TAGNAME "GZ_SET"
00385
00386 #define ZIPSTREAMER_TARGET "target"
00387
00388 #define ZIPSTREAMER_HEADER "header"
00389 #define ZIPSTREAMER_HEADER_DEF ""
00390
00391 #define ZIPSTREAMER_ACTION "action"
00392 #define ZIPSTREAMER_ACTION_APPEND "append"
00393 #define ZIPSTREAMER_ACTION_DELETE "delete"
00394 #define ZIPSTREAMER_ACTION_FLUSH "flush"
00395 #define ZIPSTREAMER_ACTION_DEF ZIPSTREAMER_ACTION_FLUSH
00396
00397
00398
00399
00400 #define SQLSTREAMER_TAGNAME "SQL"
00401
00402 #define SQLSTREAMER_CONNECTION "connection"
00403 #define SQLSTREAMER_STATEMENT "statement"
00404
00405 #define SQLSTREAMER_BUFFER "buffersize"
00406 #define SQLSTREAMER_BUFFER_DEF "4096"
00407
00408 #define SQLSTREAMER_ENCLOSEREC "enclose_record"
00409 #define SQLSTREAMER_ENCLOSEREC_DEF ""
00410
00411 #define SQLSTREAMER_FILTERCOLS "filter_columns"
00412 #define SQLSTREAMER_FILTERCOLSAUTO "(auto)"
00413 #define SQLSTREAMER_FILTERCOLS_DEF ""
00414
00415 #define SQLSTREAMER_FLUSH "flushrecords"
00416 #define SQLSTREAMER_FLUSH_DEF "1"
00417
00418 #define SQLSTREAMER_COMMIT "commitrecords"
00419 #define SQLSTREAMER_COMMIT_DEF "1"
00420
00421 #define SQLSTREAMER_STREAMRECORDS "streamrecords"
00422 #define SQLSTREAMER_STREAMRECORDS_DEF "1"
00423
00424 #define SQLSTREAMER_ERRFATAL "dberror_fatal"
00425 #define SQLSTREAMER_ERRFATAL_DEF REQ_TRUE
00426
00427 #define SQLSTREAMER_TRANSMITDATA "transmit_data"
00428 #define SQLSTREAMER_TRANSMITDATA_DEF REQ_FALSE
00429
00430
00431
00432
00433
00434 #define AUTODESCSTREAMER_TAGNAME "DB_AUTODESC"
00435
00436 #define AUTODESCSTREAMER_CONNECTION "connection"
00437
00438 #define AUTODESCSTREAMER_EXPAND "expand_fields"
00439 #define AUTODESCSTREAMER_EXPAND_DEF REQ_FALSE
00440
00441 #define AUTODESCSTREAMER_DBSPECBUF 50
00442 #define AUTODESCSTREAMER_OTLBUF 50
00443
00444
00445
00446
00447 #define DDLSTREAMER_TAGNAME "DB_MAKEDDL"
00448
00449 #define DDLSTREAMER_VARCHARSIZE "255"
00450 #define DDLSTREAMER_DBSPECSEP ","
00451
00452
00453
00454
00455 #define DB_ORA "ORA"
00456 #define DB_MSSQL "MSSQL"
00457 #define DB_DB2 "DB2"
00458 #define SQL_SYNTAX_ORA 1
00459 #define SQL_SYNTAX_MSSQL 2
00460 #define SQL_SYNTAX_DB2 3
00461
00462
00463
00464
00465
00466 #define DBOBJGETSTREAMER_TAGNAME "DB_GET"
00467
00468 #define DBOBJGETSTREAMER_CONNECTION "connection"
00469 #define DBOBJGETSTREAMER_TARGET "target"
00470
00471 #define DBOBJGETSTREAMER_MAXITEMS "maxitems"
00472 #define DBOBJGETSTREAMER_MAXITEMS_DEF "0"
00473
00474 #define DBOBJGETSTREAMER_FLAT "flat"
00475 #define DBOBJGETSTREAMER_FLAT_DEF REQ_FALSE
00476
00477 #define DBOBJGETSTREAMER_OTL_BUFFER "buffersize"
00478 #define DBOBJGETSTREAMER_OTL_BUFFER_DEF "128"
00479
00480 #define DBOBJGETSTREAMER_STREAMOBJECTS "streamobjects"
00481 #define DBOBJGETSTREAMER_STREAMOBJECTS_DEF "1"
00482
00483 #define DBOBJGETSTREAMER_SQLSEP ":"
00484 #define DBOBJGETSTREAMER_LISTKEYCOLSEP ",;,"
00485 #define DBOBJGETSTREAMER_PARKEYNAMEBUF 20
00486 #define DBOBJGETSTREAMER_PARPKEY "FIELD_PARENT_KEY"
00487 #define DBOBJGETSTREAMER_SELFPKEY "FIELD_SELF_KEY"
00488
00489
00490
00491
00492
00493 #define DBOBJGETSTMT_FIELD "field"
00494 #define DBOBJGETSTMT_OP "op"
00495
00496 #define DBOBJGETSTMT_FILTER "filter"
00497 #define DBOBJGETSTMT_TYPE_FILTER 1
00498 #define DBOBJGETSTMT_FILTEROPDEF "="
00499 #define DBOBJGETSTMT_FILTEROPGT "gt"
00500 #define DBOBJGETSTMT_FILTEROPLT "lt"
00501 #define DBOBJGETSTMT_FILTEROPGTE "gte"
00502 #define DBOBJGETSTMT_FILTEROPLTE "lte"
00503 #define DBOBJGETSTMT_FILTEROPEQ "eq"
00504 #define DBOBJGETSTMT_FILTEROPNE "ne"
00505 #define DBOBJGETSTMT_FILTEROPIN "in"
00506 #define DBOBJGETSTMT_FILTEROPSEARCH "search"
00507 #define DBOBJGETSTMT_FILTEROPFIND "find"
00508 #define DBOBJGETSTMT_FILTEROPLIKE "like"
00509
00510 #define DBOBJGETSTMT_ORDER "order"
00511 #define DBOBJGETSTMT_TYPE_ORDER 2
00512 #define DBOBJGETSTMT_ORDEROPDEF "ASC"
00513
00514
00515
00516
00517 #define DB_NULL "null" //< ????
00518
00519 #define DBOBJSETSTREAMER_TAGNAME "DB_SET"
00520
00521 #define DBOBJSETSTREAMER_TARGET "target"
00522 #define DBOBJSETSTREAMER_CONNECTION "connection"
00523
00524 #define DBOBJSETSTREAMER_OTL_BUFFER "buffersize"
00525 #define DBOBJSETSTREAMER_OTL_BUFFER_DEF "1024"
00526
00527 #define DBOBJSETSTREAMER_ACTION "action"
00528 #define DBOBJSETSTREAMER_ACTION_DEF "update"
00529
00530 #define DBOBJSETSTREAMER_COMMITPACKS "commitobjects"
00531 #define DBOBJSETSTREAMER_COMMITPACKS_DEF "1"
00532
00533 #define DBOBJSETSTREAMER_ERRFATAL "dberror_fatal"
00534 #define DBOBJSETSTREAMER_ERRFATAL_DEF REQ_TRUE
00535
00536 #define DBOBJSETSTREAMER_OUTPUTDBERROR "output_dberror"
00537 #define DBOBJSETSTREAMER_OUTPUTDBERROR_DEF REQ_NOOUTPUT
00538
00539 #define DBOBJSETSTREAMER_OUTPUTREPORT "output_report"
00540 #define DBOBJSETSTREAMER_OUTPUTREPORT_DEF REQ_NOOUTPUT
00541
00542 #define DBOBJSETSTREAMER_OUTPUTREJECT "output_reject"
00543 #define DBOBJSETSTREAMER_OUTPUTREJECT_DEF REQ_PARENTOUTPUT
00544
00545 #define DBOBJSETSTREAMER_COUNT "count"
00546 #define DBOBJSETSTREAMER_COUNT_DEF REQ_FALSE
00547
00548 #define DBOBJSETSTREAMER_STREAMOBJECTS "streamobjects"
00549 #define DBOBJSETSTREAMER_STREAMOBJECTS_DEF "1"
00550
00551
00552
00553
00554 #define DBOBJECTTYPE_NODE 1
00555 #define DBOBJECTTYPE_FIELD 2
00556
00557 #define DBOBJECTNODE_ACTION "action"
00558 #define DBOBJECTNODE_ACTIONNONE "none"
00559 #define DBOBJECTNODE_ACTIONINSERT "insert"
00560 #define DBOBJECTNODE_ACTIONUPDATE "update"
00561 #define DBOBJECTNODE_ACTIONDELETE "delete"
00562
00563 #define DBOBJECTNODE_SELREQSEP '/'
00564 #define DBOBJECTNODE_ATTRMARK '@'
00565 #define DBOBJECTNODE_SELF "."
00566 #define DBOBJECTNODE_PARENT ".."
00567
00568
00569
00570
00571 #define DBOBJDEFFIELD_TAGNAME "field"
00572 #define DBOBJDEFFIELD_NAME "name"
00573 #define DBOBJDEFFIELD_FIELD "DBfield"
00574
00575 #define DBOBJDEFFIELD_IVALUE "ivalue"
00576 #define DBOBJDEFFIELD_UVALUE "uvalue"
00577 #define DBOBJDEFFIELD_DVALUE "dvalue"
00578 #define DBOBJDEFFIELD_VALUE "value"
00579 #define DBOBJDEFFIELD_NOVALUE "###NIL###"
00580
00581 #define DBOBJDEFFIELD_HIDDEN "hidden"
00582
00583 #define DBOBJDEFFIELD_MAP "DBmap"
00584 #define DBOBJDEFFIELD_MAP_STRING "string"
00585 #define DBOBJDEFFIELD_MAP_NUM "num"
00586 #define DBOBJDEFFIELD_MAP_DATE "date"
00587 #define DBOBJDEFFIELD_DATE_FORMAT "date_format"
00588 #define DBOBJDEFFIELD_DATE_FORMAT_DEF_ORA "YYYY-MM-DD HH24:MI:SS"
00589 #define DBOBJDEFFIELD_DATE_FORMAT_DEF_MSSQL "120"
00590
00591 #define DBOBJDEFFIELD_DBSPEC "DBspec"
00592
00593 #define DBOBJDEFFIELD_DBSPECSEP ","
00594 #define DBOBJDEFFIELD_ATTR '@'
00595
00596
00597 #define DBOBJDEFNODE_TAGNAME "node"
00598 #define DBOBJDEFNODE_NAME "name"
00599 #define DBOBJDEFNODE_TABLE "DBtable"
00600
00601 #define DBOBJDEFNODE_LOCK "lock"
00602 #define DBOBJDEFNODE_DISTINCT "distinct"
00603
00604 #define DBOBJDEFNODE_PKEY "pkey"
00605 #define DBOBJDEFNODE_INKEY "inkey"
00606 #define DBOBJDEFNODE_OUTKEY "outkey"
00607 #define DBOBJDEFNODE_RESTRICT "restrict"
00608
00609 #define DBOBJDEFNODE_CHECKPRE "check_pre"
00610 #define DBOBJDEFNODE_CHECKPOST "check_post"
00611
00612 #define DBOBJDEFNODE_ONINSERT "oninsert"
00613 #define DBOBJDEFNODE_ONUPDATE "onupdate"
00614 #define DBOBJDEFNODE_ONDELETE "ondelete"
00615 #define DBOBJDEFNODE_NOEVENT "(none)"
00616 #define DBOBJDEFNODE_VARSQLSEP ':'
00617
00618
00619
00620
00621
00622
00623
00624
00625
00626 #define XMLVALUER_DELIM "@@@"
00627 #define XMLVALUER_SEP ":"
00628
00629
00630
00631
00632 #define DATEVALUER_TAG "DATE"
00633 #define DATEFORMAT_USER "user"
00634 #define DATEFORMAT_FILE "file"
00635 #define DATEFORMAT_SQL "sql"
00636
00637
00638
00639
00640 #define ENVVALUER_TAG "ENV"
00641
00642
00643
00644
00645 #define PARAMVALUER_TAG "VAL"
00646
00647
00648
00649
00650 #define SQLVALUER_TAG "SQL"
00651 #define SQLVALUER_OTL_BUFFER 50
00652
00653
00654
00655
00656 #define XPATHVALUER_TAG "XPATH"
00657
00658
00659
00660
00661 #define LANGVALUER_TAG "LANG"
00662
00663
00664
00665
00666
00667
00668 #include "config/errcodes.hpp"
00669
00670 #endif
00671
00672